In the pre-Islamic period we used to apply spells, and we asked God’s messenger how he looked upon that. He replied, “Submit your invocations to me. There is no harm in invocations so long as there is no polytheism in them.”
Usama b. Sharik told that when God’s messenger was asked whether they should make use of medical treatment he replied, “Yes servants of God, make use of medical treatment, for God has not made a disease without appointing a remedy for it, with the exception of one disease; viz., old age.”
Jabir told that God’s messenger prohibited invocations, and the family of ‘Amr b. Hazm came and said, “Messenger of God, we had an invocation proved efficacious which we applied for scorpion bite, but you have prohibited invocations.” They submitted it to him and he said, “I see no harm in it. If any of you is able to benefit his brother, let him do so.”