A sensible person would be ashamed to do such a thing.
Literal
Discernment [possessive-ある] person [if-なら] so do [nominalizer-こと] [object-を] would-be-ashamed would.
恥じる (to be ashamed) takes を to mark what one is ashamed of. Note 分別ある versus 分別のある — dropping の between a noun and ある is a slightly more literary variant. The ~なら conditional sets up a premise about the person rather than a one-off event.