1. Preheat the oven to 200C/400F/Gas mark 6. Sieve the flour, cocoa, salt and sugar into a bowl, and rub in the butter to form a mixture that resembles fresh breadcrumbs.
2. Mix in the egg yolk and vanilla extract and bring the mixture together adding milk if necessary, then knead gently to form a firm dough. Wrap and chill for 30 minutes.
3. Roll out the pastry thinly on a lightly-floured surface to fit a 23-cm (9-in) fluted loose-bottomed flan tin. The pastry is very short so you may find it easier to mould the pastry into the tin.
4. Prick the base all over with a fork and bake in the oven for 15-20 minutes until set and firm to the touch.