Salam alaikum wa rahmatullahi Taala wa barakatu.
Here i am going to present two fatwas from top shia cleric of our time.
Q190: Is it permissible to use white magic which is employed for good and is the opposite of black magic which is used by evil persons?
A: Magic in all its shapes and forms is forbidden [even that which is used to undo magic] unless the matter rests upon a greater benefit such as saving the life of a respected person. (FM, pp. 417-18)
What about non-respected person, about simple Muslim?? Ok, respected person is ill, an he is dying. What we should do? First we are praying to Allah, asking for shafa. If it would not help, we are doing white magic???? And how does he see that?
Q191: Inviting the souls in order to ask them about their state and the barzakh and other matters pertaining to the hereafter.
A: It is prohibited to invite a respected soul whose summoning would cause him harm. Other than these (respected souls), it is permissible. (FM, p. 418)
Dont forget to invite Sistani soul after he will die. And ask, how is it going on??
Fatwas on-line right here.