Preheat the oven to 400ºF/205ºC.
If using tinned steel moulds, grease them with butter and coat them in flour or sugar.
Sift the flour with the baking powder and set aside.
In a medium bowl (or a stand mixer bowl) cream the sugar with the butter.
Beat in one egg. Once incorporated, add half of the flour mixture.
Mix in the second egg, followed by the rest of the flour.
Add the milk in stages, mixing as you go along.
If using a flavouring, mix this in.
Transfer the batter to a piping bag without a tip.
Fill the moulds 3/4 of the way and place the mould on a baking sheet.
Bake for 12 minutes, or until the madeleines spring back when touched, rotating the pan halfway through.
Transfer to a cooling rack and allow to cool for at least 5 minutes before removing them from the moulds.