Arrange rack in center of oven; preheat to 450°. Wrap shallot and garlic halves in foil. Arrange on a parchment-lined baking sheet. Bake shallots and garlic until softened, 40 to 50 minutes.