The 6th prohibition is that we are forbidden from serving an idol even in a manner other than one of the four types of service which we have mentioned.1 This is upon condition that it is served k'darkah, i.e. in the way this idol is customarily served — such as excreting to [the idol] P'or,2 or throwing a stone at Merkulis.3
The source of this commandment is G‑d's statement (exalted be He),4 "[Do not bow down to them] or serve them."
In the words of the Mechilta, "[The two phrases,]5 'Do not bow down to them or serve them,' constitute two separate prohibitions: to serve is one and to bow down is another."6
Therefore, one who threw a stone at P'or or excreted to Merkulis does not transgress [this prohibition] since it is not the customary manner of service, and G‑d Al‑mighty (exalted be He) stated,7 "[Be careful lest you try to find out about their gods saying,] 'Now, how8 do these nations worship their gods? I would also like to try [such practices].'"
One who transgresses this prohibition intentionally is punished by death by stoning or kares,9 and if unintentionally, he must bring a sacrifice.10
The details of this mitzvah have also11 been explained in the seventh chapter of Sanhedrin.12
There it is it asked why the punishment of kares is mentioned three times in reference to idolatry, and the answer is given: one is for serving k'darkah [in the customary manner], one is for serving lo k'darkah [in an uncustomary way], and one is for serving the idol Molech.13 This means to say that anyone who serves any idol in any manner is punished by kares if it is served k'darkah, i.e. in the customary manner, such as excreting to P'or, throwing a stone at Merkulis, or cutting one's hair to K'mosh.14 Similarly, anyone who serves any idol in one of the four types of service [mentioned in N5] is punished by kares, even if the idol is not customarily served in that manner, such as bringing a sacrifice to P'or or bowing down to Merkulis. This is called lo k'darkah. The third case of kares is one who passes [some of his children] over the fire to Molech, as we will explain.15