There should be a work box in the wall where the hard wire comes out. That's where you put the plug. You might need an adapter depending on what size the box is. IE: you want the new plug to fit into the box. Just wire the plug correctly. Black to hot, white to neutral, bare to ground.
Power off before you do this, of course.
Did you ever see OHM'S mother in LAW?...... SHOCKING!