Your refrigerator needs a few inches of space on the hinge side in order for the door to open fully. If there’s a wall on that side it means you leave a gap. A bit of lumber and some inexpensive hardware can turn that gap into a pull-out pantry.
This picture is from [Ratmax00’s] pantry project. He had a 6.5″ gap to work with and started the build by making a wooden frame using pocket screws for the butt joints. Four casters were added to the bottom to make it roll in and out easily. He needed a handle and a way to make sure commodities didn’t fall off the shelves. He chose to use a 3D printer for brackets that hold the fence dowels and a custom handle. If you don’t have that just hit the cabinet hardware aisle at your local home store.
We wonder if it would have been possible to use full-extension draw rails mounted above and below the cabinet in addition to a couple of wheels? This would help keep the pantry from scraping against the fridge or the wall.
While you’re building bookshelf sized things why not get to work on a hidden door as well?