Confused

I had an ultrasound done im only 5 weeks pregnant but they say im having an ectopic .. My hcg levels are flunctuating . They seen a sac in my uterus but no baby & cant find the baby .. She said i have low motility in my fallopian tubes but if that were true how the Gestational sac get there ?