It sucks, but networking. Desperate companies usually don't have to means to go through a formal interview process and they'll often hire someone solely based on recommendations.
I got my current job simply because a friend worked there. I had practically zero experience in the field.