Devarim / Deuteronomy 12:28 · Sod
שְׁמֹר וְשָׁמַעְתָּ אֵת כָּל־הַדְּבָרִים הָאֵלֶּה אֲשֶׁר אָנֹכִי מְצַוֶּךָּ לְמַעַן יִיטַב לְךָ וּלְבָנֶיךָ אַחֲרֶיךָ עַד־עוֹלָם כִּי תַעֲשֶׂה הַטּוֹב וְהַיָּשָׁר בְּעֵינֵי יְהוָה אֱלֹהֶיךָ׃
Keep and listen to all these words that I command you, so that it may go well with you and with your children after you for ever, when you do what is good and right in the eyes of the Eternal your Almighty.
Sod סוֹד
Waiting for the commandment
A worker does what he is told and is glad when nothing more is asked. One who loves waits to be asked again. A chasidic master sees this difference in the word "keep".
Avodat Yisrael: one who serves the Creator as a servant does only what is commanded and does not want to be commanded more. One who serves out of love longs: when will a commandment come to me, and I will fulfil it? "Keep" means "wait", as the father of Yosef (Joseph) kept his dream. The servant cleaves to the Creator through the worlds and sees Him in His works, but the lover cleaves to Him Himself, with no partition. And one who serves out of love shines his righteousness on others too: "you and your children after you".
How Avodat Yisrael explain it
Avodat Yisrael Keep and listen to all these words which I command you, and so on
For it is written: "And it will be righteousness for us if we keep to do all this commandment" (Devarim / Deuteronomy 6:25). One who serves the Creator, blessed is He, as a servant and does His will does only what he was commanded, and that suffices him, and he does not desire to be commanded more by his master, because he serves not out of love but only out of fear. But one who merits serving the Eternal, blessed is He, out of love yearns and longs: when will a commandment come into my hand, and I will fulfil it? And this level is called "if we keep to do", from "and his father kept the matter" (Bereshit / Genesis 37:11), that is, he keeps and waits: when will I merit serving the Eternal, blessed is He, with some deed?
But not every person merits this level. This level is a gift of the Eternal, blessed is He, to the one He grants it. And this is what is said: "And it will be righteousness for us if we keep to do": this level will be righteousness for us from the Eternal, blessed is He, that we merit to keep in order to do, that is, we will love and long to do the commandments.
One who serves the Eternal, blessed is He, as a servant does not merit cleaving to the Infinite Light (אוֹר אֵין סוֹף), blessed is He, except through the chain of the worlds. And his awe comes from seeing the awesome works of His hands. But one who serves out of love, as said, merits cleaving to the Creator Himself, blessed be His Name, with no partition between.
And this is "keep and listen", as said: be keeping and waiting for His service in the way of love, and then you will merit to do "all these words which I command you". "I" (אָנֹכִי) precisely, that is, the Infinite, blessed is He.
And there is another consequence: one who serves out of love has the strength to shine his righteousness on others. This is what is said: "so that it may go well (יִיטַב) with you and with your children after you". For we find that students are called children, and "go well" (יִיטַב) is from "when he trims (בְּהֵיטִיבוֹ) the lamps" (Shemot / Exodus 30:7): that he may shine with his Torah to his children after him.
Takeaway
The verb שָׁמַר means both "keep" and "wait": of Yosef's father it says he "kept the matter" (Bereshit / Genesis 37:11), that is, he waited for the dream to come true. On this page Degel Machaneh Ephraim finds the same thought: "keep" is "wait".
The word יִיטַב ("go well") shares its root with בְּהֵיטִיבוֹ, "when he trims" the lamps in the Sanctuary (Shemot / Exodus 30:7). Hence the reading: one who serves out of love lights a light for his students too.