Preheat the oven to 180 degrees.
Roll out the puff pastry until 5mm thick. Prick it all over with a fork. Rest it in the fridge.
Peel and slice the onions very finely. Cook gently in the butter with the salt and pepper until completely soft and mushy.
Partially cook the puff pastry between 2 baking sheets for 6 minutes.
Spread the onion mixture on the puff pastry leaving a 1 cm border round the edges. Place the anchovy fillets on top of the onion mixture in a criss cross pattern and dot around the black olives.
Bake in the oven for a further 10 minutes until the pastry is crisp and golden brown. Cut in to slices and serve as a canapé, hot or cold.