I like the idea, very intriguing. I've been 'blue-skying' some sort of a trailer for a while, too.
I'd go with the wheels toward the center of the cart, rather than at the end to balance the cargo. Make the trailer carry the load, instead of transferring it to the bike. A seat-post hitch would work well, if you don't have a rear carrier. Our little trailer hitches onto a chainstay, pretty close to the drive sprocket and tensioner. As Harley59's discovered, being hitched down there can really mess you up on tight turns (rights, mostly).
For braking power, I was thinking of running the trailer's cables to a triangle or T-connector, which would probably be where I'd make the disconnect from the bike. A dual brake lever with one cable for the bike and the other leading to the trailer connection was the way I was thinking to go. Something else I considered for a few minutes would be a weight that could slide back and forth in the direction of travel, with a cable attached that would pull on the brake cable when the weight slid forward (on a downhill run) and would be pushed back with a spring to neutral on flat ground. I don't know how it would work out, so far it's only in my head.
Here's another approach, make the shopping cart the front end of the bike: