To a large mixing bowl add gluten free flour, xanthan gum, salt and sugar. Mix well.
Add your cold cubed butter and rub into the flour using a fork or your fingers until it starts to look like breadcrumbs. Add the egg and mix in using a table knife.
Add water 1 tablespoon at a time and mix well until it starts to form a dough (you will need around 3-4 tablespoons in total).
Turn out onto a floured surface and knead until smooth. Wrap in clingfilm and place in the fridge for at least an hour.
Preheat the oven to 180°C. Remove the pastry from the fridge and roll out on a lightly floured surface to larger than your pastry tin. Carefully line the dish with the rolled out pastry, trim off any excess pastry from the edges.
Place baking paper or foil tightly against the crust and fill with baking beans. Blind bake for 10 minutes. Remove the baking paper and beans and bake for a further 5 minutes. Remove from the oven and set aside.