Begging always presents a difficult situation for the ethical traveller.
Always carefully evaluate requests for gifts and money. As a general rule, as difficult as it is, you should never give money to beggars.
This is especially difficult with regard to children who are often kept out of school to beg as a form of income by their parents. By handing out money you are ultimately condoning these methods.
If you want to give, then buy essential goods to hand out like food, water, blankets and toiletries. The most efficient way to help though is by supporting local and charities which can direct your money to the most needy in the most cost effective manner.
Although you won’t get the immediate gratification, that handing out a few pesetas to a street beggar may bring, in the long term you will be making a larger overall impact to the problem at hand.
When purchasing souvenirs try and buy from local markets and handcrafts so that the money goes directly to local businesses.
Eat in local restaurants and cafes too as far as possible, rather than western imports selling the staple of burgers and chips, as these can threaten the livelihood of local restaurants.