Millions of criminals enter and exit prisons every day without any good change in their manners and thoughts. In fact, they exit prison full of anger and a strong desire of revenge against society. There are others who don’t, of course, but they are minority.
Criminals, whether violent or not are still human beings and should be treated as well. Keeping someone behind iron bars and expecting them to improve their behavior is as inefficient as making wars in order to make peace, it simply does not work.
The best punishment will always be opportunity. Most criminals are in crime only because they never had the opportunity to be someone in life, and find in crime the chance to gather money and to raise a family. In other words, they do not do it because they want to; they do it because they must.
To conclude, they cannot be put behind bars, nor set free to live in society. They must be given the opportunity to work, even if they are still prisoners.