2,504. Performing Shechitah With Improper Intentions
Hilchos Shechita 2:14
If a person slaughters to the mountains, hills, seas, rivers or deserts, the slaughter is invalid. This is so even if his intention wasn’t to worship these things but for medicinal purposes or for similar reasons as per non-Jewish practices. If he slaughtered to the constellation governing the sea or the mountain, or to the stars or the constellations, etc., it is then prohibited even to benefit from the slaughtered animal as is the case with all sacrifices offered to idols.
Hilchos Shechita 2:15
If a person slaughters an animal intending to sprinkle its blood or burn its fats to idols, it is prohibited because we learn the halacha of one’s intentions when slaughtering outside the Temple from those who slaughter consecrated animals in the Temple courtyard. Such intentions invalidate the animals, as will be discussed IY”H in Hilchos P’sulei HaMukdashin.