Heat the butter in a non-stick saucepan or frying pan over medium heat. Add the onions and saute for 6 to 7 minutes until the onions are soft and clear. Season with the ground pepper, then add in the olives, the thyme and the stock. Then, simmer until the onions are caramelised and all of the liquid is absorbed. Leave to cool.
Preheat the oven to 200*C and lightly oil 24 mini tart moulds.
Cut 48 circles out of the puff pastry with a biscuit cutter or a glass and line the bottom of the 24 tart moulds with one circle each.
Fill the pastry cases with the onion mixture and top off with a lid and glaze with beaten egg, then cut a slit is the centre of the lid with a sharp knife.
Place the pie in the preheat oven and bake for 15 minutes until the pastry is golden and puffed. Serve warm with a sprig of thyme.
5 stars from 1 rating of the onion jam and olive pies