While shallots and onions share a similar flavor profile, shallots have a milder taste. If you don’t have shallots on hand, you can use onions as a substitute, but be aware that the flavor might be slightly different.