Making excuses for the pirates isn't an answer, its a cop out. We can feel sorry for them and their living conditions but that does not give them permission to attack shipping in offshore waters. Governments, the UN and NGOs have tried to help and all they get is killed for trying to help. The same is true for your local gang bangers. If you make the decision to live outside the law, you must expect to face consequences. Defense lawyers try to explain that the 17 year old that shot a clerk during a robbery isn't really responsible because he was raised by a drugged out mother who whored to get enough money for food, his father is unknown and he was only robbing the store to get food.
Somehow it seems to me that the pirates need to be treated as we would the Taliban, Al Qaeda, or any other violent group. If encountered attempting to capture a ship the military forces in the region should use all means to stop the attempt, including naval gunfire and aerial attack. If deemed necessary force should be applied to known bases and headquarters. It would be possible to set a limit on how far out the Somali fishing fleet could go to sea before a presumption of piracy was made, perhaps give them a hundred miles and keep shipping a hundred miles further out. Simply create an exclusion zone where no one should be, except military vessels. We, the Western world, have the capability, but do we have the will?