The air expands once the plane is at 35,000 feet but the shampoo doesn’t. But if there’s no air in the shampoo bottle, then the changing air pressure outside the bottle doesn’t affect the liquid contents of the bottle, and all of the goop stays in the bottle.