Observe ("Shamor") the Shabbat day, that you may sanctify it... and you shall remember that you once were a slave in the land of Egypt and God took your from there with a mighty hand and an outstretched arm; therefore God commanded you to observe the Shabbat (Devarim 5:12,15).

Compare this with the earlier mention of the Ten Commandments in the Torah:

Remember ("Zachor") the Shabbat day, that you may sanctify it... for in six days God created the heavens and the earth, the sea and all that is in them, and He rested on the seventh day; therefore God blessed and sanctified the Shabbat (Shemot 20:8,11).

Rashi inquires why the Torah begins its first account with the word "Zachor" and the second with the word "Shamor?" He answers with the famous Midrash that both Shamor and Zachor were spoken and heard simultaneously as one word (Mechilta 20:8). Hence, the opening verse of the Lecha Dodi song: Shamor VeZachor BeDibbur Echad = ““Observe” and “Remember” in one utterance”.

Nevertheless, the question remains why mention Zachor specifically in the first account and Shamor in the second reading?

Meshech Chochmah explains that one purpose of our Shabbat is to testify that God created the world in six days and ceased from creative activity on Shabbat. Another reason is to give people a day off work, enabling them to direct their attention solely to spiritual pursuits. It provides an ideal opportunity to learn about God and to study His Torah.

In the desert, where the Israelites did not work for a living because they received the Manna daily, they spent their time studying the Torah in great depth. For them, Shabbat was not needed as a day off to learn. Its main purpose was to testify that God created the world. This is why the Ten Commandments in Shemot , taught in the first year of the Israelites’ sojourn in the desert, emphasise Zachor, i.e. remember that God created the world. Zachor is the positive aspect of remembering Shabbat that includes reciting Kiddush (at the beginning) and Havdallah (at the conclusion), which speak about creation.

In our Sidra, when Moshe is reviewing the Mitzvot, just weeks prior to the Israelites’ entry into the land of Israel, the other reason for Shabbat had to be accentuated. The people were about to conquer the land, where they would begin a new life of agriculture and industry. They needed to appreciate that Shabbat would provide them with an opportunity to recharge their spiritual batteries, to energise themselves for the week ahead. The Torah therefore emphasised Shamor, meaning observe the Shabbat prohibitions (Melachot) so that Shabbat becomes a truly spiritual encounter, without distractions.