Preheat your oven to 180°C/160°C Fan/Gas Mark 4. Grease a 8inch loose bottomed, round baking tin.
Add your softened butter and both sugars to a large bowl and cream together until light and fluffy.
Add in your egg and vanilla extract and mix again.
Add in your gluten free flour, xanthan gum, bicarbonate of soda, salt and cornflour and mix.
Mix in your three quarters of your chocolate chunks. Leave the other quarter to top your cookie pie.
Press half of your cookie dough into the base of your tin, make it slightly higher around the edges so there is a lip. Spread your chocolate spread on top of the cookie dough, then put the remaining cookie dough on top so the chocolate is fully covered.
Press your remaining chocolate chunks into the top of the cookie pie.
Bake in the oven for about 30-35 minutes and until more golden on top. Allow to cool in the tin for at least 30 minutes before removing and allowing to fully cool or you can slice whilst still warm too. It should be lovely and crisp on the outside but gooey in the middle. Enjoy!