Preheat oven to 180 c / 350 F
Beat the butter, vanilla and sugar until pale and fluffy.
Add the eggs one at a time, allowing to fully combine between each addition
By hand sift the flour and the baking powder over the mix and fold it in to combine
To make the topping, melt the butter and sugar in a large pan until melted and bubbling. Add the pineapple and toss lightly for around 3 - 4 minutes. Add the rum and flambe if you are using it.
Grease the muffin pan well with butter and flour or spray with non-stick cooking spray. Divide the topping between the 15 muffin cups in a greased pan. it will be about a dessert spoon per cup.
Using an ice-cream scoop, evenly measure out the cake batter and dollop onto each pineapple mix (about 3/4 of the way up the pan).
Bake for 25 - 30 mins, until golden brown.
Allow to cool in the pan.
Gently pry the cakes away from the edges with a small spatula and invert them out to serve.