Preheat the oven to 350 F. Brush some oil or non-stick cooking spray in the middle of a sheet pan.
Press the garlic or cut it into small pieces. Saute the shallots in olive oil until soft and translucent and starting to brown.
If using dough, roll it out to about a 12-inch circle. If using puff pastry, lay it out on your work surface.
Place the wheel of brie in the middle of the dough. Place the garlic and shallots on top of the brie. Fold up one corner of the dough over the brie and brush with the egg wash. Fold up the next corner over the brie and brush with egg wash. Continue this process until the brie has been fully covered. Brush the top with egg wash. If you want, you can add a few shallot rings on top for decoration.
Place the brie onto the prepared sheet pan and place it in the oven on the middle rack. Bake for 30 minutes, or until the crust is cooked and has a golden brown hue.
Once it's done baking, remove the brie from the oven. Let it rest for 5 minutes before slicing into it. It will be very hot so be careful.