In a medium mixing bowl, white rice flour, cornstarch, cocoa powder, salt, and xanthan gum. Set aside.
In a large mixing bowl, cream together sugar and butter. (Use medium-high speed with a handheld mixer or medium speed with a stand mixer.)
Add eggs. Mix until combined. Reduce mixer speed to medium. Add dry ingredients and vanilla extract. (Add chocolate chips if using.) Mix until a batter forms. Spread batter into prepared pan.