Doing all you can to avoid hitting them except, say, not launching missiles in the vicinity of their houses.
I get it: Hamas is a morally monstrous organization. I agree with that wholeheartedly. But there's such a thing as proportionate response. For every Israeli civilian that's killed, many more (greater than 10, at the least) Palestinian civilians are killed. The fact that Hamas is barbaric and doesn't have laser guided missiles doesn't change the fact that innocent people are being bombed to death.
What should Israel do? Well, frack if I know. But "we're trapped in a conflict with a barbaric organization, so we must be barbaric, too, to compete with them" means you can't complain when people call you barbaric.
I don't think they are being barbaric, though. They are launching pinpoint strikes, and doing all they can to avoid civilian casualties. Hamas is deliberately hiding amongst their own civilians to generate casualties.