They may be from the same family, but just like siblings, there are a few distinctions.
They appear to be similar; can you just substitute one for the other?
All About Shallots
Although in the same family, onions and shallots are not the same.

Credit:Caitlin Bensel; Food Stylist: Torie Cox
While an onion grows individually, shallots, like garlic, grow in clusters on a plant.
A shallot will also reveal cloves when peeled.
Shallots will impart a more mild flavor, but for most recipes that isn’t a problem.

Credit:Caitlin Bensel; Food Stylist: Torie Cox
Can I use an onion instead of a shallot?
Onions can also be swapped for shallots in most cooked applications.
That said, both onions and shallots are commonly used in professional kitchens, often even in conjunction.

Credit:Caitlin Bensel; Food Stylist: Torie Cox
In a cool, dark, and dry place just like onions.