Prison does have the advantage that it stops them offending for the time they're inside, so the public get some protection, and it enables the authorities to do something with them: get them off drugs, give them some education or training, start dealing with any mental illness, etc., all of which will help prevent them re-offending.
I doubt if shame is much of a punishment for your average recidivist scroat.
I'm not necessarily arguing for prison as opposed to other measures, but there are some things to be said for it. It depends on the individual case - some might benefit from a prison sentence (and certainly their potential victims would), some wouldn't. I'm not sure it's a good idea to lay down hard and fast rules.
I don't understand why imprisonment costs so much (though I don't doubt that it does): if prisoners are given productive work, either for outside contractors or cleaning, cooking, etc., their wages should go a long way towards paying for their upkeep, I'd've thought.