@Navat604 or one of the other electrical experts in the community can say more, but almost certainly what your friend did, if he is a licensed electrician, is to bring over the neutral. Not the ground. A ground should never be used to substitute for a neutral. But it is quite common to “fish up” a neutral from another nearby outlet or switchbox and tie it in to the auxiliary switch.