Vayikra / Leviticus 26:3 · Pshat
אִם־בְּחֻקֹּתַי תֵּלֵכוּ וְאֶת־מִצְוֺתַי תִּשְׁמְרוּ וַעֲשִׂיתֶם אֹתָם׃
"If you walk in My statutes and keep My commandments and do them,
Pshat פְּשָׁט
Toiling in Torah
You can do everything you are supposed to do and still put nothing into learning. Is it enough just to do the right things?
Rashi: doing the commandments is already named in "keep My commandments," so "walk in My statutes" means toiling in Torah, learning in order to keep and do. Sforno: "and do them" means doing good out of the soul's own wish, out of love, not out of fear like one who was ordered.
How Rashi and Sforno explain it
Rashi If you walk in My statutes
One might think this means keeping the commandments. But when it says "and keep My commandments," keeping the commandments is already stated. How then do I explain "if you walk in My statutes"? It means: toil in Torah.
Rashi And keep My commandments
Toil in Torah in order to keep and to do, as it says: "And you shall learn them and keep them, to do them" (Devarim / Deuteronomy 5:1).
Sforno And do them
Then this perfection will become your own possession: you will do the commandments like those who do good by their soul's own wish, not like those who were commanded and act out of fear, for then the doer is in some way under compulsion. No, do them out of love, wanting what God wants, as the sages said: "Do His will as your own will" (Pirkei Avot 2:4).
Takeaway
Rashi reads three parts of the verse: "walk in the statutes," "keep the commandments" and "do them." If each part adds something new, "walk" is no longer doing but learning.
The verse Rashi quotes is spoken by Moshe (Moses) to the people before he repeats the Ten Statements (Devarim / Deuteronomy 5:1).
"Do His will as your own will" comes from Pirkei Avot (2:4), the book of sayings of the sages of the Mishnah.