Praise be to Allaah.
Firstly: it is permissible to pray behind one who writes amulets from the Qur’aan and prescribed du’aa’s, but he should not write them, because it is not permissible to hang them on one’s body or elsewhere. But if the amulets include anything that constitutes shirk, then you should not pray behind the one who writes them. It should be explained to him that this is shirk and the one who should do that (explain this) is one who has knowledge of this matter.
Making vows to anyone or anything other than Allaah is shirk, and offering sacrifices to anyone or anything other than Allaah is shirk, because Allaah says (interpretation of the meaning):
“And whatever you spend for spendings (e.g., in Sadaqah — charity for Allaah’s Cause) or whatever vow you make, be sure Allaah knows it all
“Say (O Muhammad): “Verily, my Salaah (prayer), my sacrifice, my living, and my dying are for Allâh, the Lord of the ‘Aalameen (mankind, jinn and all that exists).
And because the Prophet (peace and blessings of Allaah be upon him) said: “May Allaah curse those who offer sacrifices to anyone or anything other than Allaah.”
Vows are also implied by the word “nusuki” (in al-An’aam 6:162, translated here as “my sacrifice”).
Secondly: It has not been reported that the Prophet (peace and blessings of Allaah be upon him) ever commanded anyone to buy a ram or a cow to slaughter it and let the young boys eat it when there was a drought, in order to make rain fall. What is prescribed in such cases is Salaat al-Istisqaa’ (prayer asking for rain), du’aa’, praying for forgiveness and giving in charity. The action described in the question is a bid’ah (reprehensible innovation) which has no basis in the pure sharee’ah of Islam. It was reported in a saheeh hadeeth that the Prophet (peace and blessings of Allaah be upon him) said: “Whoever does an action that is not in accordance with this matter of ours (i.e., Islam), will have it rejected.”
And Allaah is the source of strength. May Allaah bless our Prophet Muhammad and his family and companions, and grant them peace.