This wiring diagram illustrates wiring a light switch to control an existing receptacle outlet. The source is at the receptacle and a switch loop is added to a new switch. The hot source wire is removed from the receptacle and spliced to the red wire running to the switch. The black wire to the switch connects to the hot on the receptacle.
A special isolated-ground receptacle is require for this circuit and can be identified by the orange color and a small triangle imprinted on the face. When connecting the wires, the isolated ground wire (the red wire pictured here) is marked with green tape or paint on each end and connected to the grounding bar in the service panel, and to the grounding terminal on the receptacle.
The wiring in this diagram is for adding a new light fixture to a switched receptacle, i.e. one that is hot only when a switch is on. These are commonly used to turn a table or floor lamp on and off from a wall switch.
This wiring illustrates the switched-receptacle circuit with the switch coming first. The hot source is wired to the bottom terminal on the switch and the top terminal connects to the black running to the receptacle. The source neutral is spliced through to the receptacle neutral.