Is it permissible to fast with the intention of drawing closer to Allah and earning reward, and with the intention of losing weight?
Question

I like to fast in the winter because the days are short. Of course I hope for the reward of Allah, but I also hope to lose a little weight. Is it permissible for me to combine two intentions? Another question also occurred to me: many people – including myself – are afraid of sin and of committing haraam actions for fear of what people will say, or for fear of scandal or shame, or loss of dignity and self-pride. Will that be good for a person in the hereafter?
Praise be to Allah.Firstly:
There is nothing wrong with combining the intention of seeking reward for fasting and the intention of losing weight, although it is preferable for a person to intend his fasting for the purpose of attaining reward only. Losing weight will inevitably happen when one fasts, whether one intends that or not.
As-Suyooti (may Allah have mercy on him) said in al-Ashbaah wa’n-Nazaa’ir (pp. 21-22):
Combined intentions (and motives) are of many types. Firstly, a person may have, alongside the intention of worship, a motive that is not worship but will not invalidate it. One example of that is if a person intends to do wudoo’ or ghusl, and also to cool himself. There are some views which suggest that it is not valid because of that combined intention, but the more correct view is that it is valid, because cooling oneself is something that will inevitably happen, regardless of whether or not that was part of the motive for doing wudoo’ or ghusl. So he did not plan to have a combined intention, and he did not intend to undermine his sincerity; rather his intention was to do an act of worship in a manner or at a time that is prescribed, because one of its inevitable outcomes is cooling oneself. The same applies if a person has the intention to fast, and also has another motive, namely the desire to avoid certain foods for reasons of health. But there is still some difference of opinion concerning that.
End quote.
For more information, please see the answer to question no. 112075 
Secondly:
With regard to giving up sin for fear of what people will say, or because the individual has no motive to commit that sin, or he refrains from it because of shyness before people, this has been discussed previously in detail, in the answer to question number 180814  qv.
And Allah knows best.