In a large ovenproof skillet over medium heat, heat oil. Add shallot and garlic and cook, stirring occasionally, until shallot is translucent, about 5 minutes. Add mushrooms and cook, stirring occasionally, until softened, about 5 minutes more. Add spinach and cook, stirring frequently, until wilted, about 2 minutes; season with salt and black pepper.