Devarim / Deuteronomy 11:22 · Pshat
כִּי אִם־שָׁמֹר תִּשְׁמְרוּן אֶת־כָּל־הַמִּצְוָה הַזֹּאת אֲשֶׁר אָנֹכִי מְצַוֶּה אֶתְכֶם לַעֲשֹׂתָהּ לְאַהֲבָה אֶת־יְהוָה אֱלֹהֵיכֶם לָלֶכֶת בְּכָל־דְּרָכָיו וּלְדָבְקָה־בוֹ׃
For if you diligently keep all this commandment which I command you to do, to love the Eternal your Almighty, to walk in all His ways, and to cleave to Him,
Pshat פְּשָׁט
How to cleave to a fire
The verse commands "to cleave to the Eternal". But how can a person cleave to One who cannot be seen and who is called "a consuming fire"?
Rashi: to walk in His ways means to be like Him: He is merciful, so you be merciful, He does kindness, so you do kindness. One cannot cleave to the One who is "a consuming fire", so cleave to the sages and their students, and it will count for you as if you cleaved to Him. Sforno: His ways are righteousness and justice, and to cleave to Him means to direct all your deeds to doing His will.
How Rashi and Sforno explain it
Rashi To walk in all His ways
He is merciful, so you be merciful. He does kindness, so you do kindness.
Rashi And to cleave to Him
Is it possible to say so? Is He not a consuming fire? Rather, cleave to the students and to the sages, and I will count it for you as if you cleaved to Him.
Sforno And to walk in all His ways
To conduct yourselves in those ways by which He guides His world, and these are righteousness and justice.
Sforno And to cleave to Him
So that all your deeds are directed to doing His will, as it is said: "In all your ways know Him" (Mishlei / Proverbs 3:6).
Takeaway
"A consuming fire" is what Moshe (Moses) calls the Eternal in our portion and the one before (Devarim / Deuteronomy 4:24, 9:3).
The same verb דָּבַק ("cleave") stands in the verse "to Him you shall cleave" (Devarim / Deuteronomy 10:20). Midrash Lekach Tov explains it as Rashi does: cleave to the sages and their students.