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.