Shallots are members of the onion family. They don't taste as strong as most other varieties, but they do have a hint of garlic. If a recipe calls for shallots and all you have on hand is an onion, go ahead and substitute. Because of the close relationship between shallots and other suitable substitutes, you can often replace in the exact same amount as called for in the recipe without affecting the consistency of the food.
Any onion can substitute for a shallot, and each cook may have a favorite. Because shallots have a mild flavor, consider using sweet onions. Small white "pearl" onions also work well as shallot substitutes. Adding just a pinch of garlic powder can help mimic the shallot flavor, but garlic is much stronger than shallots, so beware of adding too much. If you prefer to use fresh garlic, crush a clove in a garlic press or similar device, then add just the liquid that comes out. If your kids are helping you prepare a meal, opt for the "pearl" onions, as these miniature versions can be fun for kids and cause fewer tears.
Leeks and Scallions
Scallions, or green onions, are mild enough to make a good straight-across substitution for shallots, and their flavor does not need the addition of garlic to add a full, rich flavor to your recipe. Use only the tops, not the bulbs, of these onions when substituting for scallions, and add them as late in the cooking process as possible because they are easy to overcook. Leeks share many properties with green onions, and you can use them as a shallot substitute the same way: tops only. However, leeks take much longer to cook than green onions, so add them into your recipe early or pre-soften them by sautéing over medium heat if the recipe calls for adding shallots near the end.
Garlic scapes look much like green onions, except they have long, twisting tails and taste somewhere between garlic and onions. They are also firmer than green onions, and while their onion flavor is mild, a little goes a long way. If you use these herbs in place of shallots, cut back the amount the recipe calls for by about 1/4 to avoid overpowering other flavors. If you really like the flavor of garlic and onion, go ahead and add the full amount.
If your family doesn't much care for onion flavor, leave out the onion-type ingredient altogether. Most recipes will not be greatly affected by the omission. If you simply are out of shallots or can't find fresh ones in your area, look for sweet onions and green onions, which are easy to find in most grocery stores year-round.