To achieve goodness in all matter it is mandate to arrive at a practical solution this are most convincing to the victims.
There are law and order defined for almost every religion in the society and Islam’s law steps ahead from those in delivering solution rather advising not to commit bad deeds.
For instance consider a person who rob for his survival, he was led into that situation because of poverty. Islam had derived a solution for this in the name of Zakat (one of five pillars in Islam). With this practice every wealthy person who has savings around 85 grams of Gold should offer 2.5% of total savings to poor people every lunar year as charity. This has been stated in holy Quran as
“And what Allah restored to His Messenger from the people of the towns – it is for Allah and for the Messenger and for [his] near relatives and orphans and the [stranded] traveler – so that it will not be a perpetual distribution among the rich from among you. And whatever the Messenger has given you – take; and what he has forbidden you – refrain from. And fear Allah; indeed, Allah is severe in penalty.”
Likewise sharia laws bestow solution and recommend how crimes can be minimised. However those who disobey all these rules will be strictly punished without any delay.