Secure a junction box to a strong structural member such as a stud or joist if the box will be used to support a light fixture. Other types of junction boxes have wings that fit inside a cut-out drywall hole, but they will not support a light fixture.
Use a cable clamp to secure ROMEX wiring that comes into the box, and cap wires inside the box with wire nuts. If you have difficulty twisting the wires together, use a needle-nose pliers to twist black to black and white to white.
At the time of writing, Elizabeth Weintraub, DRE # 00697006, is a Broker-Associate at Lyon Real Estate in Sacramento, California.