Defrost peas at room temperature. Mix milk, cream and 1 tablespoon of pesto. Season with salt and pepper. Tear ham into small pieces. Mix gnocchi, peas, ham, except for something to garnish, and cream sauce.
Pour into a greased casserole dish (approx. 1500 ml capacity). Spread the rest of the pesto and ham on the surface. Cook in a preheated oven (electric cooker: 200 °C/ convection oven: 175 °C/ gas: level 3) for approx. 30 minutes.