Three questions arise in charity: 1) What shall we give? 2) to whom shall we give? and 3) how shall we give? The answer is here. Give anything that is good, useful, helpful, valuable. It may be property or money; it may be a helping hand; it may be advice; it may be a kind word; “whatever ye do that is good” is charity. On the other hand, if you throw away what is useless, there is no charity in it. Or if you give something with a harmful intent e.g., a sword to a mad man or a drug or sweets or even money to someone whom you want to entrap or corrupt, it is no charity but a gift of damnation.
To whom should you give? It may be tempting to earn the world’s praise by a gift that will be talked about, but are you meeting the needs of those who have the first claim on you? If you are not, you are like the person who defrauds creditors: it is no charity. Every gift is judged by its unselfish character: the degree of need or claim is a factor which you should consider; if you disregard it, there is something selfish behind it. How should it be given? As in the sight of God, this shuts out all pretence, show and insincerity.”
~Abdullah Yusuf Ali, Commentary on Verse 2:215.