Pull chains are common switch types for table lamps, but even high-quality pull chains can sometimes snap off. If only the last few inches of a pull chain has snapped off, you can easily replace it with a chain extender; but if the entire chain snapped off at the base of the pull you'll need to replace the entire socket shell. Be careful when working with anything electrical, as failing to take proper precautions could cause an electric shock.
Things You'll Need
Replacement socket with pull chain
Unplug the lamp. Remove the lampshade and light bulb.
Pop the socket shell from its base. The socket shell is the cylindrical component that houses the switch. If the shell doesn't come out easily, wedge a screwdriver between the base and the shell and pry it out.
Unscrew the socket base off the lamp by holding the nut beneath the base with a pair of pliers and twisting the base off.
Cut the wires between the socket and the base with wire cutters. There will be two wires.
Strip the plastic covering off the wires so that ½ inch of the wires are exposed.
Tie a knot in the wires that are leaving the socket base. The knot will prevent the wires from pulling out of the base if the cord is tugged.
Identify the neutral wire by finding the wire that has a rib on the plastic covering. Wrap the wire clockwise around the silver screw just beneath the screw head on the replacement socket. Tighten the screw. Wrap the other wire clockwise around the other screw. Tighten that screw.
Pull the cord through the bottom of the lamp and press the socket into the socket base.
Replace the bulb and lampshade.