Separate the end of the 2-wire plus ground wiring. Strip off the last inch of the insulation from the individual wires. Bend the ends of the wires into hooks. Hook the black wire to the brass terminal on the light fixture. Hook the white wire to the silver terminal and hook the bare copper wire to the green terminal. Tighten the screws. Cover all the connections and bare wire with electrical tape.
Cut the 2-wire with ground cable at the point where you want to install a switch. Slide the wire into one side of the junction box. Separate out the individual wires, strip the insulation from the last inch. Feed another section of your cable into the other opening on the junction box. Separate and strip the wire. Twist the white wires together and secure them with a wire nut. Do the same for the bare copper wire.
Bend the black wires in the junction box into hooks. Connect one black wire to one of the terminals on the switch and the other black wire to the other terminal. Tighten the terminal screws and mount the switch in the junction box. Attach a faceplate to cover the wires.
Cut an extension cord to expose individual wires. Leave enough of the male end of the cord to plug into the outlet. Separate and strip the last inch of the three wires inside the extension cord. Do the same for the end of your electrical cable. Twist the black wires together and secure with electrical tape. Do the same for the white wires. Connect the green wire from the extension cord to the bare wire from the electrical cabling. Cover all three with another layer of electrical tape.