Yes, you can replace shallots with onions and vice versa in cooking, but the taste may change. Also, white and red onions have a higher nutritional value than shallots, so it is recommended to use them. Shallots are a small onion with a mild taste and aroma. Onion no needs introduction, of course it is a main ingredient in most recipes and it can even be consumed raw.