All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
The intention of associating different people in the reward of charity is not valid after giving the charity, settling the intention and determining that the reward is not shared. As-Suyooti said about the timing of making the intention: “In principle, its timing is at the beginnings of acts of worship and the like.”
Thus, if a person gives charity and offers its reward to a living or deceased person, he may not associate himself in its reward after giving it. Nevertheless, it should be known that the giver of the charity will not be deprived of the reward of being kind to the one to whom he offered the reward and of helping to do good deeds.
Allaah Knows best.