Yes. Shallot and Tomato have a documented companion-planting benefit. Virginia Cooperative Extension lists shallot as a companion for tomato.
This is a practical yes, not a magic guarantee. Keep the normal spacing for Shallot and Tomato, watch airflow and watering, and treat the companion note as one useful planning signal alongside sunlight, soil, and harvest timing.
Source basis: Virginia Cooperative Extension companion planting chart. The page does not add extra pest-control or yield claims beyond the sourced fact row.
Spacing tip: Keep airflow around the larger crop and place the smaller crop at the edge of its drip line.