We propose versatile materials based on the Ruderman-Kittel-Kasuya-Yosida (RKKY) interaction in a zigzag silicene nanoribbon (ZSNR) on half filling in the presence of an out-of-plane electric field. We show that the topological phase transition in the band dispersion of ZSNR can be probed by using the RKKY interaction. We find that, due to the zero-energy edge states of the ZSNR, the exchange coupling is significantly enhanced when the impurities are located on the zigzag edges, and also explore that the strength of the interaction in the topological insulator phase is much greater than that when the system is in the band insulator region. We present a model to investigate the phase of a system of two magnetic impurities located on the edge of the ZSNR and find that three different magnetic phases, spiral, ferromagnetic, and anti-ferromagnetic, are possible for different values of the electric field. This electrical tunability of the magnetic phases in silicene can be explored by using current experimental techniques and can be of interest in the field of spintronics.