לא תעשה לך פסל וכל תמונה
Do not make an idol, even if you yourself do not serve it.
To keep us far away from idol worship.
If one transgresses
On purpose, he gets Malkos.
According to the Ramban
One only transgresses if he intends on serving it himself. Also he derives this prohibition from ואלהי מסכה לא תעשה לכם (ויקרא יט:ד).
According to the Rambam
One transgresses even if one merely commanded another to make an idol, even if he did not make it himself. The Chinuch questions this, because generally on who sends another to sin is himself inculpable.