Oxygenated blood enters the fetus via the umbilical vein via the ductus venosus and is shunted to the inferior vena cava where it mixes with deoxygenated blood from the trunk and legs.
Blood in the inferior vena cava drains into the right atrium and the foramen ovale, a shunt between the right atrium and the left atrium, allows the oxygenated blood from the inferior vena cava/right atrium to enter into the left atrium.
Because of high resistance in the pulmonary circulation in the collapsed lung, a minimal amount of blood enters in the pulmonary circulation.