While they might look similar when peeled, shallots and garlic are quite different. Shallots taste like a cross between an onion and garlic, but much milder than both. Garlic, on the other hand, has a strong, pungent flavor that becomes sweet and caramelized when roasted. They're both alliums but bring their own unique flavors to the table.