A junction box is used to add a spur or to extend circuits and direct power to lights and additional sockets. Understanding the fundamentals of how to properly wire within a. A junction box provides a code-approved place to house wire connections, whether for outlets, switches, or splices. In this article, we will provide a step-by-step guide on how to wire a junction box. But what exactly are junction boxes, and how do you ensure they're installed correctly? This. When it comes to electrical wiring, one important component that plays a crucial role in ensuring safety and durability is the junction box.