Allah's Messenger, you forbade to practise incantation, whereas I employ it for curing the sting of the scorpion, whereupon he said: He who amongst you is capable of employing it as a means to do good should do that.
Sahih Muslim Book 39, Hadith 83