Is it prescribed to fast so that Allah will meet his needs?
Question

                We have a saying that if a person wants Allah to meet his needs, he must fast. How should this fast be done?
Praise be to Allah.Fasting in order to have one’s needs met is an innovation for which there is no basis. Rather what a person must do is seek to draw closer to Allah by doing naafil (supererogatory) acts of worship, in obedience to Allah and seeking His reward, doing that sincerely for the sake of Allah alone, not for the sake of worldly gains. What is proven from the Prophet (blessings and peace of Allah be upon him) is that among those whose supplication is not rejected is the one who fasts, until he breaks his fast, because among those whose supplication will not be rejected is the fasting person until he breaks his fast. And for the fasting person when he breaks his fast, there is a supplication which will not be rejected. 
And Allah is the source of strength. May Allah send blessings and peace upon our Prophet Muhammad and his family and companions. End quote. 
Standing Committee for Academic Research and Issuing Fatwas 
Shaykh ‘Abd al-‘Azeez ibn ‘Abdullah ibn Baaz, Shaykh Saalih al-Fawzaanm Shaykh Bakr Abu Zayd.