Bike trailer/grocery buggy combo I currently grocery shop either by walking and using a grocery buggy, or by bike with panniers.

The grocery buggy (like this one on Amazon) is very convenient, and carries more cargo more easily than my pannier bags. It's also far easier to carry groceries around the store, and up the elevator in my building.

I am looking for a bike trailer which can function as both a cargo trailer and as a grocery buggy.
I use a trailer that was for moving one or two small children.  As such it came with a third front wheel, and the drawbar folds underneath. 

Not mine, but similar design.

So you could ride to the shop, park and lock your bike in the stand, fit the trailer's front wheel to make it a triangle, and fold up the towbar if required.  Now its a Pram/Pushchair/Stroller

Then do your shop, and after checkout put your stuff back in your stroller.  When you get to your bike, store the front wheel and deploy the towbar.  Hitch to your bike then ride off home.

The only gotcha for me is that stowing the drawbar requires tipping the trailer back a long way, so to deploy the towbar, the groceries have to be well-packed. 

Also, the stroller is a little wider than a shopping cart/trolley.  It can store about the same amount.  Mine's got a slab of customwood as a floor.  Its possible the market may object to a non-shop trolley, but that's a remote chance.