Wiring an outlet to a switch loop. 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.

Adding An Extra Light From A Light Switch
Wiring a light switch off an existing outlet. Here is what you would have to do if possible change out the 2 wire to 3 wire cable from switch to light. Before doing any wiring plug the radio into other outlets you plan to work on. Before touching any bare wires or terminals on a switch or outlet use a voltage tester on all the wires to make sure the power is off. The switch comes first in the new part of the circuit and new 2 wire cable is run to it from the outlet. 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. The source is at the outlet and a switch loop is added to a new switch.
Some duplex outlets can have different circuits running to adjacent outlets. The procedure is not unlike wiring multiple lights to a single switch. You then splice all the white wires and all the ground wires in the switch box together. Is it possible to wire a switch for a light and at the same time connect an outlet to the switch that will not power off and on with the switch. From the switch new 2 wire cable is run to the new light location. Mike a handyman from fort dodge iowa.
Before you tackle any part of this project turn off the power to the circuit at the main electrical panel by switching off the breaker or removing the fuse. This wiring diagram illustrates adding wiring for a light switch to control an existing wall outlet. To be safe test both the top and bottom with the radio. This electrical wiring question came from. Hook up the outlet as you normally would. Wiring a new switch and light from an outlet.
Thanks for your electrical wiring question mike. To add an outlet to a light switch you start by making a pigtail using the hot wire the wire going to the fixture controlled by the switch and a third length of wire. In this diagram power is taken from an existing wall outlet for a new switch and light fixture. As you can see connecting a receptacle to the light would see the receptacle only hot when the light switch is on. Wiring a switch with an outlet. The hot source wire is removed from the receptacle and spliced to the red wire running to the switch.
For lights turn the light switch on and off to be sure. In this case you must change the cable from the switch to the light outlet from a 2 wire to a 3 wire cable.