The Messenger of Allah (ﷺ) prayed one day and said the salam after two rak’ahs, then he left. Dhul-Shimalain caught up with him and said: “O Messenger of Alah, has the prayer been shortened or did you forget?” He said: “The prayer has not been shortened, and I did not forget.” He said: “Yes, by the One Who sent you with the truth.” The Messenger of Allah (ﷺ) said: ‘Is Dhul-Yadain speaking the truth?” They said: ‘Yes.’ So he led the people in praying two rak’ahs.
In the pre-Islamic period we used to apply spells and we asked: Messenger of Allah ! how do you look upon it ? He replied : Submit your spells to me. There is no harm in spells so long as they involve no polytheism.