When you need to add a new electrical device to your house, it's often easier to draw power from an existing circuit than to run a whole new circuit back to the panel. For example, if you need a new outlet in the kitchen, you can save a lot of time by connecting it to the switch for the kitchen lights. You can even wire the switch to control the outlet, which is a great option if you prefer a plug-in light fixture to a permanent one. The procedure is not unlike wiring multiple lights to a single switch. Conversely, you can connect the switch for a new light fixture to a nearby outlet, which is a procedure similar to wiring outlets in series.
Wiring a Switch to a Receptacle
If you're wiring a new switch, you'll need to install an electrical box. It can be anywhere, but if you want it to be compliant with the Americans With Disabilities Act, put it 44 inches above the floor, preferably near a door. Run a cable to the light fixture and another cable to the outlet from which you're drawing power. Turn off the power to the outlet, and before making connections, test the leads with a voltage tester to make sure they're dead.
At the outlet, you connect the cable to the load terminals. These are the ones that aren't connected to power. Connect the black wire to the brass terminal, the white wire to the corresponding chrome terminal and the ground wire to the green ground terminal. If something is already connected to the load terminals, you can double up wires on the terminal screws, or you can twist together the wires connected to each terminal and make a pigtail with a single wire to connect to that terminal.
When that's done, you can treat the cable coming from the outlet into the switch box as a regular line cable. Connect the black wire to one of the switch terminals and the black wire going to the light fixture to the other switch terminal. Twist the white wires together and cap them and connect the ground wires to the ground terminal.
Wiring a Receptacle to a Switch – Receptacle Always On
If power is coming into the switch box from the panel and you want to connect an outlet to the switch, your first option is to wire the receptacle to always be on. The first thing you need to do is distinguish the line cable coming from the panel from the load cable, which is the one going to the light fixture. With the breaker on, turn the switch off and test both switch leads with a voltage tester. The one that gives a positive reading is the line. Once you identify it, be sure to turn off the breaker before proceeding.
Remove the black line wire from the switch, twist it together with the black wire going to the receptacle and add a six-inch length of black wire of the same gauge. Connect this jumper wire back to the switch terminal. Now, remove the wire cap from the two white wires in the box, add the white wire from the outlet and reset the cap. You may need a larger cap. Finally, add the ground wire to the two already attached to the ground screw, either by twisting the wires together or connecting them with a crimp ring.
Wiring a Switched Receptacle
If you want the switch to control the outlet, you just need one simple change. Instead of making a pigtail with the line wire, you make it with the load wire. After identifying the line and load terminals on the switch, remove the wire going to the light fixture, twist it together with the wire going to the outlet, add a jumper wire, cap them and attach the jumper wire back to the switch's load terminal. Twist and cap the white wires, connect all the ground wires to the ground screw and you're done.