to beat back into shape
to correct (a bad habit, character trait, etc.) by discipline; to straighten (someone) out