ספר המדות, Improper Thoughts / Part I Improper Thoughts / Part I · יב
Sefer HaMiddot 743
יב. עַל־יְדֵי לִמּוּד אַרְבָּעָה "שֻׁלְחָן־עָרוּךְ" יִתְבַּטֵּל הַפְּנִיּוֹת.
12. Learning the four [sections] of the Shulchan Aruch (Code of Jewish Law) nullifies ulterior motives.