Pregnancy help? Possible ectopic pregnancy?

I have a few questions, how far along until after having sex can you take a pregnancy test? I know its two weeks but does that count without a missed period yet? I had sex about a week ago without a condom and am now having extreme kidney and flank pain, along with abdominal pain and the feeling of having to make bowel movements but not being able to. I told my mother about this pain and she told me it could be pregnancy, I look it up and those are signs of ectopic pregnancy. Would I feel it that soon? Is it something else or?? and if it is how would I even go about that. I'm only 16.