I'm an electrician also and I agree your best bet is a lamp dimmer its cheaper when you figure in the cost of the box,connector,and wire nuts you will need .

But if you did want to install the dimmer you have you will also need an electrical box to put it in and a cord grip style connector.
I am assuming your lamp has a 2 wire cord which means it does not have a ground so you wont be able to ground the dimmer without buying a cord with three prongs. If you did hook it up ungrounded I would use a plastic box. On your lamp cord one of the wires will have ribs on the outside edge it should also have the bigger prong on the plug that one is your neutral it needs to be connected together directly with a wire nut or not cut if possible. The other wire will be smooth on the outer edge it is the hot it needs to be cut and the side with the plug on it will go to the line side of the dimmer this should be marked on the back of the dimmer or in the instructions. the other side of the smooth wire that goes to the lamp hooks to the wire on the dimmer marked load. If the line and load are not marked at all on the dimmer it should not matter which way you hook it up.
But again I DO NOT RECOMMEND you attempting to install this on your own you could get hurt or cause a fire and it definitely not worth that but if your confident you can do it then that's your decision