Transporting groceries
Delicate items would probably survive best in a small backpack.  Your body acts like a natural shock absorber so anything strapped to your back should get the smoothest ride, especially if you're out of the saddle for the bumpiest sections.  Remember to keep the pack light though.

Put heavier items like milk on a rear rack, rear panniers or ideally on a trailer.  On your back they can get really tiring and on a front rack they can really destabilize your front wheel (even worse for something that sloshes around).

Fragile and heavy?  (e.g. jars, glass bottles)  Put them in a carrier on the rear rack, but make sure they're well padded from both the bike and each other.