Through tzedakah for its own sake, you will merit Torah for its own sake.
Sefer HaMidos, Torah Study, Part I §78