1. Place the ham in a large heavy-based saucepan. Add carrot and half a chilli to the pan. Add enough water to cover the ham completely. Bring to the boil, then reduce the heat and simmer for about 50 - 60 minutes (20 to 25 minutes per 500g). Remove from the heat and allow the ham to cool in the cooking liquid.
2. Preheat the oven to 160°C/gas mark 3.
3. Combine the red pepper relish, honey, shallot, garlic and chilli flakes in a bowl. Transfer the ham to a roasting tin. Using a sharp knife, carefully remove the skin from the ham, then score the fat in a criss-cross (diamond) pattern. Spread the glaze over the ham with a spoon. Bake in the oven for 15 to 20 minutes, until golden brown. Remove from the oven and loosely cover with a foil tent. Rest for 20 minutes before carving.
4. When the ham comes out of the oven, raise the temperature to 180°C/gas mark 4.
5. To make the potato pie, melt the butter in a frying pan set over a medium heat. Add the onions, garlic and thyme and cook for 3 to 4 minutes, stirring occasionally, until softened, then season with salt and pepper. Add the potatoes, stock, cream and parsley. Bring to the boil, then reduce the heat and simmer for 3 to 5 minutes to partly cook the potatoes. Don’t fully cook the potatoes at this stage and carefully stir so that you don’t create a mushy texture. You want the potato slices to keep their shape. Transfer the contents of the pan to a baking dish. Leave to cool down for 10 minutes.
6. Lightly dust a work surface with flour, then roll out the pastry on the floured surface until it’s big enough to cover the top of the baking dish. Mix the egg with a splash of milk. Brush the puff pastry with the egg wash, then cover the cooled potatoes in the baking dish with the pastry, brushed side down. Brush the top of the pastry with egg wash and cut a small slit in the top to let the steam escape from the pie. Bake in the oven for 20 minutes, until golden brown.
7. To make the buttered spinach while the potato pie is baking, melt the butter in a large frying pan. When the butter start to foam, add the shallot and garlic and cook for 30 seconds, then add the spinach and white wine. Cook for 2 minutes or so, until wilted. Season with salt and pepper and remove from the heat.
8. Serve the warm carved ham with the potato pie and buttered spinach on the side.