Preheat oven to 400°F. Meanwhile, cook shallots and garlic in butter in an ovenproof 10-inch heavy skillet over moderate heat, stirring, until golden, about 5 minutes. Add chard stems and center ribs and cook, covered, stirring occasionally, until crisp-tender, 3 to 4 minutes. Add leaves and cook, uncovered, stirring occasionally, until tender, 6 to 7 minutes. Season with salt and pepper, then transfer chard to a heavy saucepan and wipe out the skillet.