Hiring an electrician to add outlets, fixtures or switches to a home can be an expensive undertaking. However, with general knowledge about electrical codes and safety precautions, you will be able to complete this project without having to go to that expense. According to the National Electrical Code, junction boxes must be used when splicing into wires. They must not be hidden behind walls or other structural components of the building. A cover must also be secured to the face of the box.

...
A junction box is required when tying into existing wiring.
...
Use a circuit tester to be certain the power is off.

Step 1

Put on the safety goggles or glasses and the rubber-soled shoes. Remove any standing water from underneath the circuit breaker panel. Place the rubber mat on the floor near the panel. Turn off the circuit breaker that provides power to the area being worked on. Insert the probes of the circuit tester into an outlet on the circuit that was shut off. If no power is indicated, it is safe to continue.

Step 2

Cut the wire, with the wire cutters, at the spot where the junction is to be made. Pull the wires back to allow room for the installation of the junction box. Remove the appropriate number of knockouts from the box. Each cable must enter the box through its own knockout hole. Place the screwdriver between the open end of the knockout and the box and twist until the knockout can be gripped with the pliers. Grab the knockout with the pliers and twist until it comes off. Install a cable connector in each knockout hole. Twist the lock nut on the connector until it is tight. Screw the junction box to a stud or joist.

...
Wire nuts are used to make a secure connection.

Step 3

Push the ROMEX® cable through the cable connectors until six inches of wire protrude through the box. Tighten the screws of the cable connectors until snug. Remove the sheathing from the wires to within 1/2 inch of the cable connectors. With the wire strippers, strip 3/4 inch of wire from the ends of all colored wires in the box. Place all of the black wires together so the ends are even. Twist these wires together in a clockwise direction. Twist a wire nut on the wires until snug. Test the connection by gently tugging on each wire. If a wire is loose, remove the wire nut and repeat this step. Replicate this procedure with the white wires.

Step 4

Cut a 6-inch length of bare copper wire from the cable. Create a hook on one end of this pigtail with the lineman's pliers. Connect the pigtail with the other ground wires in the box. Screw the hooked end of the pigtail to the green grounding screw of the junction box. Carefully push all of the wires into the junction box and screw the cover onto the face of the box. Restore power to the circuit.