The World Federation One Stop Fiqh

Ruling 1516

A person who is hired must perform the act with the intention of discharging the obligation that is on the deceased. Therefore, it is not sufficient if he simply performs an act and dedicates the reward of it to him.