A barium swallow is a type of test used to look inside the esophagus, or food pipe. A doctor might recommend this test if they need to look at the outline of any part of a person’s digestive system.