The Talmud tells us that Rav Elazar would give a coin to a needy individual, and (only) then he would pray.