Once, a beggar from Al-Ansar came to the prophet (PBUH) who asked him: don’t you have anything in your homes? The man answered: yes, a piece, of a cloth, part which we wear, and part of which we lay on the ground; and a pot for water.
The prophet (PBUH) told him: Get them.
Then the prophet (PBUH) sold the cloth and the pot to one of his companions for two dirhams, gave the price to the man from Al-Ansar and told him: Buy food for your family with one dirham and buy an axe head with the other. When the man came back, the prophet (PBUH) fixed a wooden handle to the axe head and told the man: Go and cut wood; I do not want to see you for fifteen days.
The man worked as a wood cutter and came back after fifteen days with ten dirhams in his pocket. He was thus able to buy food and clothes for his family.
The prophet (PBUH) commented saying:
This is better for you than to be marked on the face, on the Day of Judgment.
Begging may not be allowed except in three cases:
Severe poorness, frightening debt or the express need to pay a ransom (deya).
Related by Abou Daoud.