A lamp socket and switch can be wired with very little effort. A socket is actually three pieces: the socket cap or base, the exterior socket sleeve and the interior socket/switch. Whether you need to add the entire socket or just the interior socket/switch, the wiring is the same. Knowing how to wire a light socket and switch will allow you to repair broken lamps rather than throw them in the trash.
Unplug the lamp from the wall outlet and move it to a level work surface. Remove the light bulb and the lamp shade.
Remove the lamp harp. The harp--the part which holds the shade in place--attaches to the lamp by tension placed on the harp base from the harp itself. Squeeze the harp sides together to release the harp from the harp base.
Remove the exterior socket sleeve. The sleeve will pull up and off of the socket and allow you to access the interior socket/switch.
Feel the lamp wires. One side will be ribbed and one side will be smooth. Wrap the end of the smooth wire around the brass screw on the interior socket/switch and tighten the screw. Wrap the ribbed wire around the aluminium screw and tighten that screw as well.
Slide the socket sleeve back over the interior socket/switch and push firmly down on the sleeve to set it firmly in the socket base.
Replace the lamp harp, light bulb and lamp shade. Plug your lamp back into the wall and test it.