לְמַ֛עַן תְּפֹ֥שׂ אֶת־בֵּֽית־יִשְׂרָאֵ֖ל בְּלִבָּ֑ם אֲשֶׁ֤ר נָזֹ֙רוּ֙ מֵֽעָלַ֔י בְּגִלּֽוּלֵיהֶ֖ם כֻּלָּֽם׃ (ס)
supaya Aku dapat menangkap kaum Israel pada hati mereka, yang semuanya telah menjauhkan diri dari-Ku karena berhala-berhala mereka.
Or HaChaim
עיניכם הראות, "you have seen with your own eyes, etc." Moses meant that the Israelites had first- hand experience of the severity with which G'd punishes idol worship. G'd relates to that sin more harshly than to any other sin. He punishes even the people who have not actually served the idol with any of their limbs or their organs but have merely entertained idolatrous thoughts. G'd destroyed people who intended to worship Baal Pe-or. Kidushin 39 cites Ezekiel 14,5 as proof that G'd punishes the mere intention to indulge in idol worship.
Or HaChaim
לא יהיה לך אלוקים אחרים על פני, "Do not have any other gods before Me." Having first commanded us to demonstrate faith in G'd, something which is basically a matter of the heart, G'd adds that it is also important to divest oneself of idolatrous thoughts, even if one does not verbalise them. G'd added the word לך to include the command that one must not even think such thoughts to oneself. We find that such thoughts are culpable (Kidushin 39) based on Ezekiel 14,4-5: "who will bring up his idols to his heart. Thus I will hold the House of Israel to account for their thoughts, etc." We have a tradition that one cannot impose capital punishment on a person unless the warning of such a penalty is spelled out in the Torah. Our verse is the source for this penalty (compare Zevachim 106).
Kli Yakar
Do not turn to idols. After warning about the fear of the three who bring one into being [God, father, mother], the Torah comes to exclude idols, as it is written, They say to wood, “You are my father,” and to stone, “You gave birth to me” (Jeremiah 2:27). This tells you that there are no partners in your creation except these three and no more. And adjacent to this is And when you offer a peace offering, because it said do not turn, and unspecified turning refers to the heart, as it is written, And if your heart turns away (Deuteronomy 30:17), Whose heart turns away (Deuteronomy 29:17). For with idolatry the Holy One, blessed be He, combines thought with action, as it is said, In order to seize the house of Israel by their heart (Ezekiel 14:5). And the reason for this is that the essence of idolatry depends on the heart of the believer, and we do not find throughout the Torah that thought invalidates like action except in idolatry and with sacrifices. For if one thought during slaughter to eat it outside its designated time or place, it is an abomination, it shall not be accepted. Therefore, the commandment Do not turn to idols, which speaks of turning in the heart, is adjacent to the commandment And when you offer a peace offering to the Lord, offer it so that it may be acceptable for you. Rashi explains that you should not have invalid thoughts about it. For in the entire Torah, matters of the heart are not considered significant except for these two.