A man once came to the Baal Shem Tov zy’a and cried that he was suffering from many tzaros. He asked the Besh’t to daven for him to improve his plight.
The Besh’t was deeply saddened to hear about the man’s suffering and wanted to help him. However, he saw with his holy vision that there was no way for him to help the man. He walked over to his bookcase and took out a Gemara Bava Basra. He opened it at random to the Gemara (15B) that says that one who took money from Iyov was blessed. This was because he helped Iyov see success in the merit of his charity. He saw this as a sign that this was the way for the man to be saved, and he began to contemplate how to hint to him that this is what he must do.
In the city of Brod, there lived a man named R’ Shabsi Meir, who was both learned and wealthy. He gave a lot of tzedakah, and davened a lot to Hashem that his charity should end up in the right places and those who really needed help should get it. Although Hashem blessed him with much wealth, he lived a simple lifestyle and did not spend money on luxuries. Hashem accepted his prayers, and it was decreed that his tzedakah would always end up in good hands.
When the Besh’t remembered this Jew, he realized that he had been shown this Gemara in order to recall R’ Shabsi Meir of Brod, about whom it had been decreed that he would be successful in properly distributing tzedakah. He realized that the poor man’s salvation would come through him.
The Besh’t told the man to go to Brod and ask to spend Shabbos as a guest of R’ Shabsi Meir. After Shabbos, he was to thank R’ Shabsi Meir for his hospitality and ask for his bracha for salvation, and the blessing would be fulfilled in the merit of his tzedakah.
The man did as he was told. He spent Shabbos as a guest of R’ Shabsi Meir. On Motzoei Shabbos, he told him that the Baal Shem tov had sent him to obtain his blessing. R’ Shabsi Meir warmly blessed him, and, indeed, his situation improved and he found his yeshua.