It was a war. Shit happens.
No, it wasn't a war. It was a series of heavy-handed, ultra-violent overreactions to minor incidents which themselves were responses to systematic oppression. Military action often does kill civilians, the so-called "collateral damage", but herding groups of unarmed women and children into a building and then deliberately shelling that building to kill them all is not collateral damage; the unarmed civilians were the target.
If you want to understand what's really going on in Israel, I highly recommend you read "Goliath: Life and Loathing in Greater Israel", by Max Blumenthal. It's a hard book to read, not because Blumenthal isn't a good writer but because the truth is so horrible. And if you doubt that it is the truth, check the included citations.