Not necessarily, it depends on the structure of the contract. For us (DHHS outreach/communications contract), those funds are already obligated, and not dependent on the budget still being negotiated, so we still get paid as long as we can do work, although that part depends on how much we depend on our Federal clients for feedback, approval, assignments, etc. I've always had a list of things that SHOULD be done but were almost permanently shelved because of other, more important tasks; those have been the things I've worked on when we've had significant shutdowns in the past.
Now, as for how my company gets the money to pay me, I have no idea. I am pretty sure they bill the government periodically based on our hourly billings, but I would think that would have to be put on hold during a shutdown, so really small companies might not be able to sustain that for more than a month or two. But that's out of my wheelhouse.