If you already sign a contract, you should check it, to see, how it affects you, and what are your responsabilities.
You should also, be careful about what the other company offers you, don't trust the name or the size of any company. As a Soft. Dev. who has some knowledge of Human Resources (I was going to study that), changing jobs, too often or too quickly, could be consider a sign of not being responsible.
But, as an employee, I agree that sometimes, this circumstances are the only way of getting a good job.
Many company direct recruiters or recruiters only hire people that are already working, or are going to start to work for other companies. They have this overprotective idea that if a person is unemployed is because is a bad employee for any reason.
It may be true for some cases, for not all, its very subjective. And the same employee may fit in a company, and don't fit in another company, even if the job description, seems to be similar.
For the record, I was offered a job once, and I was unemployed for 3 months after finishing a temporal project. I need more money than usual, because I had to paid not the rent, food or car gas, also some loans due to be unemployed. I accept the job a wednesday, without signing any contract, and go to the office on monday. Friday I recieve another similar job with a considerable higher income.
I took the second job, and call the first company. I just mention that I just really need the extra money.