Wiring a Light, Switch then Outlet
This is the most complicated wiring configuration we will examine. This job will require a special kind of wire, three wire cable with ground. This must be run between the switch box and the light box as shown in our diagram.
In the light box, the source black wire is connected with the black wire from the switch box. A wire is then pig-tailed to the switch. Pig-tailing is a process where a short wire is cut to lead from a connector to a connection at a cap. Joining these two black wires is the black with from the outlet or receptacle. The red wire is connected to the opposite end of the switch box and to the black wire on the light (back in the light box). As in the last diagram we are isolating the light from the rest of the circuit.
In previous diagrams we have gotten used to thinking about the switch in terms of in and out being top and bottom. In an outlet the in/out is more right side/left side. The black wire is connected to the bronze screw or shoved into the hole next to it, while the white wire is connected to the silver screw or the hole next to it. There are generally instructions on the back of an outlet telling the electrician where each color wire should go. Unlike with the switch, the ground wire always connects to the receptacle itself and in a metal box may be connected directly to the box.
Meanwhile, back in the light box all of the white wires are brought together as are the ground wires.