Halacha 1
Whoever serves false gods willingly, as a conscious act of defiance, is liable for כרת. If witnesses who warned him were present, he is [punished by being] stoned to death. If he served [such gods] inadvertently, he must bring a fixed sin offering.
Halacha 2
The gentiles established various different services for each particular idol and image. These services do not [necessarily] resemble each other. For example, Pe'or is served by defecating before it. Marculis is served by throwing stones at it or clearing stones away from it. Similarly, other services were instituted for other idols.
One who defecates before Marculis or throws a stone at Pe'or is free of liability until he serves it according to the accepted modes of service, as [implied by Deuteronomy 12:30]: "[Lest one inquire about their gods, saying,] 'How did these nations serve their gods? I will do the same.'"
For this reason, a court must know the types of worship [practiced by gentiles], because an idolater is stoned to death only when we know that [he has worshiped a false god] in the mode in which it is traditionally worshiped.
Halacha 3
The warning [forbidding] such worship and the like is the verse [Exodus 20:5] which states: "Do not serve them."
When does the above apply? with regard to services other than bowing, slaughtering [an animal], bringing a burnt offering, and offering a libation. A person who performs one of these four services to any one of the types of false gods is liable, even though this is not its accepted mode of service.
How is this exemplified? A person who offers a libation to Pe'or or slaughters [an animal] to Marculis is liable, as [implied by Exodus 22:19]: "Whoever slaughters [an animal] to any deity other than God alone must be condemned to death."
[Liability for performing the other services can be derived as follows:] Slaughter was included in the general category of services [forbidden to be performed to false gods]. Why was it mentioned explicitly? To teach [the following]: Slaughter is distinct as one of the services of God, and one who slaughters to false gods is liable to be executed by stoning. Similarly, with regard to any service which is distinct as one of the services of God, if a person performs it in worship of other gods, he is liable.
For [a similar reason, Exodus 34:14] states: "Do not bow down to another god," to teach that one is liable for bowing down [to another god] even when this is not its accepted mode of service. The same applies to one who brings a burnt offering or pours a libation. Sprinkling [blood] is considered the same as pouring a libation.
Halacha 4
[Even if] one pours feces before it or pours a libation of urine from a chamber pot before it, one is liable. If one slaughters a locust before it, one is not liable, unless this is the mode of service of that deity. Similarly, if one slaughters an animal lacking a limb for it, one is not liable, unless this is the manner of service of this deity.
[The following rules apply when] a false god is worshiped by [beating with] a staff [before it]: If one breaks a staff before it, one is liable [for the worship of false gods], and [the deity] is forbidden. If one threw a staff before it, one is held liable, but [the deity] is not forbidden, because throwing a staff is not considered equivalent to sprinkling blood. The staff remains as it was, while the blood spatters [in different directions].
A person who accepts any one of the various false gods as a deity is liable for [execution by] stoning. Even one who lifted up a brick and said, "You are my god," or the like, is liable. Even if he retracted his statements in the midst of speaking and said, "This is not my God," his retraction is not significant and he should be stoned [to death].
Halacha 5
Anyone who serves a false god through its accepted mode of service - even if he does so in a derisive manner - is liable. What is implied? When a person defecates before Pe'or to repudiate it, or throws a stone at Marculis to repudiate it - since this is the manner of serving them - the person is liable and must bring a sacrifice [to atone for] his inadvertent transgression.
Halacha 6
[The following rules apply when] a person serves a false deity out of love - i.e., he desires an image because its service is very attractive - or when one serves it out of his fear of it - i.e., he fears that it will harm him - as the [idol] worshipers fear [their deities as sources of] benefit and harm: If he accepts it as a god, he is liable to be stoned to death. If he serves it out of love or fear through its accepted mode of service or through one of the four services [mentioned above], he is not held liable.
One who embraces a false deity, kisses it, sweeps before it, mops before it, washes it, anoints it, dresses it, places shoes upon it, or performs any similar act of deference violates a negative commandment, as [implied by Exodus 20:5]: "Do not serve them." Such acts are also "service." The offender is, nevertheless, not liable for lashes, because [these services] are not [mentioned] explicitly [by the Torah].
If one of the above services was the accepted mode of worship [of a particular deity] and a person performed this service as an act of worship, he is liable [for execution].
Halacha 7
If a splinter becomes stuck in a person's foot before an idol, he should not bend down to remove it, because it appears that he is bowing down to the idol.
If money belonging to a person becomes scattered before an idol, he should not bow down and pick it up, because it appears that he is bowing down to the idol. Instead, he should sit down, and then pick it up.
Halacha 8
A person should not place his mouth over the mouths of statues which serve as fountains that are located before false deities in order to drink, because it appears that he is kissing the false deity.
Halacha 9
A person who has a false god made for himself - even though he, himself, did not actually fashion it, nor worship it - is [punished by] lashing, as [Exodus 20:5] states: "Do not make for yourself an idol or any representation."
Similarly, a person who actually fashions a false god for others, even for idolaters, is [punished by] lashing, as [Leviticus 19:4] states: "Do not make molten gods for yourselves." Accordingly, a person who actually fashions a false god1for himself receives two measures of lashes.
Halacha 10
It is prohibited to make images for decorative purposes, even though they do not represent false deities, as [implied by Exodus 20:23]: "Do not make with Me [gods of silver and gods of gold]." This refers even to images of gold and silver which are intended only for decorative purposes, lest others err and view them as deities.
It is forbidden to make decorative images of the human form alone. Therefore, it is forbidden to make human images with wood, cement, or stone. This [prohibition] applies when the image is protruding - for example, images and sculptures made in a hallway and the like. A person who makes such an image is [liable for] lashes.
In contrast, it is permitted to make human images that are engraved or painted - e.g., portraits, whether on wood or on stone - or that are part of a tapestry.
Halacha 11
[The following rules apply regarding] a signet ring which bears a human image: If the image is protruding, it is forbidden to wear it, but it is permitted to use it as a seal. If the image is an impression, it is permitted to wear it, but it is forbidden to use it as a seal, because it will create an image which protrudes.
Similarly, it is forbidden to make an image of the sun, the moon, the stars, the constellations, or the angels, as [implied by Exodus, ibid.]: "Do not make with Me [gods of silver...]" - i.e., do not make images of My servants, those who serve before Me on high. This [prohibition] applies even [to pictures] on tablets.
The images of animals and other living beings - with the exception of men - and similarly, the images of trees, grasses, and the like may be fashioned. This applies even to images which protrude.
Whoever serves false gods willingly - i.e., if he is forced to worship false gods by another person, he is not held responsible for his act. It is nevertheless forbidden to consent to such pressure. One is obligated to sacrifice one's life rather than consent to such worship (Hilchot Yesodei HaTorah 5:2,4).
as a conscious act of defiance - as opposed to someone who worships inadvertently.
[The Radbaz (Vol. V, Responsum 1510) notes that the Rambam uses the expression "willingly, as a conscious act of defiance" with regard to the violation of the prohibitions against idolatry, the Sabbath laws (Hilchot Shabbat 1:1), and the laws of Yom Kippur (Hilchot Sh'vitat Asor 1:1). With regard to all other transgressions punishable by כרת, he states merely: "as a conscious act of defiance."
The Radbaz explains that it is possible that the Rambam mentioned the concept of "willingly" with regard to these three transgressions because they are the first cases of כרת mentioned in the Mishneh Torah. Furthermre, they are transgressions which people at large would consider most severe. After mentioning the concept on these three occasions, the Rambam does not think further repetition is necessary.]
is liable for כרת. - Mo'ed Katan 28a relates that a person liable for כרת would die before reaching the age of fifty. The Rambam (Hilchot Teshuvah 8:1) emphasizes that being "cut off in this world" is not the sum total of Divine retribution for such a transgression. Rather, the person's soul is also cut off and prevented from reaching the world to come.
If witnesses who warned him - See Hilchot Sanhedrin 12:1-2.
were present - when he committed the offense and later testified in court,
he is [punished by being] stoned to death - as mentioned above, Chapter 2, Halachah 6.
If he served [such gods] inadvertently - He performed an act of idol worship without realizing that it was forbidden, or was not aware of the punishment involved (Hilchot Shegagot 2:2).
he must bring a fixed sin offering. - Though the sin offering brought to atone for idol worship differs from that brought to atone for other sins - see Numbers 15:27-31; Hilchot Shegagot 1:4 - the Rambam uses this term to differentiate it from a 18הלועáןברק דרויו - a guilt offering which differs depending on the financial status of the person bringing it.