Sorry for the clumsy title, I'm not sure what's the best way to rephrase this. And sorry in advance for the wall of text, I just feel like without the proper background this will not be a solid question.
Throwaway, since I suspect at least one of the companies involved here have people browsing this (awesome) site.
Some background: I live in a certain European country, and I'm a second year Computer Science student (on a 3-year track) at a local, respected private university.
I decided I'd like to dip my toes in "professional", employer-employee type programming (after doing a few programming projects for personal clients of mine). Not sure if that's the correct English term, but a student "Salaryman" position is what I was looking for,
After a few months of applying for jobs, I got an offer from a small local company that seemed like a great fit for me: Great pay, flexible hours (as I'm a student, and require part-time work) and a nice group of people. It's small (think smaller than whatever it is you're thinking right now), and a bit far from me, but all in all it's a good fit. Let's call that company Company A.
The process for applying to Company A was... not great. After the initial interview and the coding test, I got a promise from the CEO that I'll get a contract by date X. That did not happen, and after 2 delays I got fed up and started applying to other jobs since the CEO was not very communicative. Literally one day after I started applying elsewhere, the CEO called me to apologise with a (reasonable-sounding) excuse. It's a small company, I figured, and was just happy that I'd get to work for that company. I stopped applying elsewhere after sending out like 5 applications.
After I got the contract and while I was reviewing it, I heard back from an amazing offshore company that is involved in a field I'm super-excited about (one of the 5 I applied to). After some back and forth in which we discussed a remote job setting, I received a coding test, seemingly passed it, and now have a follow-up personal interview. Let's call that company Company B.
Company B is good. It's a great stepping stone for my career, will probably match the (great) pay I got from Company A, and will involve working with more senior engineers on interesting projects (while in Company A I will mostly work by myself on projects).
I've been with Company A a little over a week, and I have no qualms about jumping ship once (and if) an offer from Company B comes.
My question: How do I make a clean departure as easy as possible from Company A? I'm aware I'll burn that bridge, and that's a risk I'm willing to take. My concern is how to hurt Company A the least, while making sure they don't reach out to Company B in the process and sabotage my chances.
Note: This is a "how" question, not an "if" question. I've weighed my options, and if that offer comes I'm out of there.
Edits: My country's exit rules require me to give one month of notice. I will give that before moving on to the next country, and the exit clause on my contract is loose - you want out, you're gone. Also, this is not an internship - we don't have that here - it's just a student job. It does not fall any under special treatment. I'm just a part-time worker.