For the custard: In a small saucepan, combine 1/2 cup sugar, 4 tablespoons flour and a pinch of salt. Stir in milk, a little at a time, until smooth.
Bring to a boil over medium heat, stirring constantly. Boil 60 seconds, then stir in a small amount of hot liquid into the 2 egg yolks.
Return heated egg yolks to saucepan and stir, over heat, until mixture starts to bubble again. Remove from heat, add vanilla essence. Cover and chill in refrigerator.
Preheat oven to 230 C.
For the pastry: In a medium saucepan, combine shortening and water and bring to a boil. Sift together 1 cup flour and a pinch of salt and pour all at once into boiling mixture.
Stir vigorously until mixture forms a ball. Remove from heat, and add eggs, one at a time, stirring vigorously after each addition. Drop by spoonfuls onto flat baking trays, or pipe into desired shape.
Bake in the preheated oven, for 10 minutes then reduce heat to 200 C and bake 25 minutes more, or until golden.
Cool completely, split, fill with custard, and replace tops.