In a mixing bowl, whisk the egg yolks, sugar and flour together. Set aside.
In a sauce pan, bring the milk to a boil. Remove from heat once it comes to a boil.
Slowly pour milk into the egg mixture, continuously whisking.
Pour the mixture back into the sauce pan and bring up to a boil, continuously whisking.
Cook for 1-2 minutes and remove from heat. The custard should be thick enough to coat the back of a spatula.
Add the vanilla, butter and salt.
Cover the custard with plastic wrap so it touches the custard (this prevents a skin from forming).
Let it completely cool in the fridge util ready for use.