Ever since Augustine, the Catholic tradition has considered these four verses to be a unity for the purely grammatical reason that the plural "gods" (v. 7) is the logical referent for "them" (v. 9). Despite attempts to read a later belief that there is only one God into this passage, the text presents God's demand of Israel's complete allegiance in response to God's saving activity on their behalf at the Red Sea. Even if there are other gods, God claims Israel's loyalty for God alone. The marginal note in the NRSV ("besides") indicates the ambiguity of the preposition "before me." It is as if the text is unconcerned about the existence of other gods; what matters is Israel's response to God's deliverance. This means that it is fundamentally a description of relationship. This relational aspect of the Decalogue will continue to guide our understanding of these texts.
The matter of idols is obviously forbidden in verses 8-10. Unfortunately, the Bible is surprisingly silent as to why this is the case. The prohibition is grounded in God's "jealousy" (qanna). The verse might better be translated, "For I…am an impassioned God" (NJPS), since God's response includes both a limited retribution ("to the third and fourth generation," v. 9) and an unlimited love ("to the thousandth generation," v. 10).
7you shall have no other gods before* me.
8 You shall not make for yourself an idol, whether in the form of anything that is in heaven above, or that is on the earth beneath, or that is in the water under the earth. 9You shall not bow down to them or worship them; for I the Lord your God am a jealous God, punishing children for the iniquity of parents, to the third and fourth generation of those who reject me, 10but showing steadfast love to the thousandth generation* of those who love me and keep my commandments.
New Revised Standard Version Bible: Anglicized Edition, copyright © 1989, 1995 National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved worldwide. http://nrsvbibles.org