Yes and no.
Put your hand on the back on your fridge. You should feel some warmth. If you put the fridge into an unventilated cupboard, that heat will build up and the fridge won't work. So you first need to look after ventilation.
Then there's no way to attach a cabinet door to the fridge. So you'll have to first open the cabinet door, and then open the fridge.
Either go with a free standing fridge that you can see, or get an integrated one. You'll get annoyed with a free standing one in a cupboard.