Question: If a person does a good deed not out of the intention of being rewarded, as they were ignorant of Thawaab (reward from Allaah), will they still get a recompense for their good deeds?
Answer: As long as the person intends by doing this deed to draw closer to Allaah and it is in conformity with the Sharee‘ah, they will have the reward that Allaah has promised for such a deed, even if they are ignorant of the reward… read more here.
Question: I donated some money to a charitable project out of embarrassment and fear of my boss, but if I had had the choice, I would not have donated a penny. Will I be fully rewarded for this deed just as if I have done it out of free will? Please, clarify this point and cite the evidence.
Answer: If the case is as you mentioned, then you will not be rewarded for donating this sum, as it was not in the Cause of Allaah, but out of fear of your boss. It is authentically reported that the Prophet (peace be upon him) said: Actions are only according to intentions, and every person shall have but that which he intended…… read more here.