Adding outlet to kitchen cabinet with a gap
I would use and 4-square commercial metal box, available from the big box stores or any home center/large hardware store.  Knock out a hole in the back of the box, insert a pop-in NM connector install the wire through the connector and screw the box to the back of the cabinet.  Purchase a single gang mud ring.  install the ring on the box.  Install the receptacle and the plate.