If you want to work for free I'd suggest doing charity work/benefits or street performing, don't ever do free work for commercial businesses.
There's a difference between working for free and working for nothing.
Just recently I put a post up with some advice on how to work for companies that can't/won't pay and how to use that to your advantage.
Restaurants are difficult. It's a very particular type of venue, and people who own restaurants tend to try to cut costs wherever possible so a performer has to prove their value constantly. What may be a good strategy for a new performer is to offer a 'trial period' of maybe 1 or 2 days a week for a month. This will give the manager/owner hard numbers to look at and judge whether paying someone to perform in their business is worth it. If you have the numbers to show you're genuinely adding value to the restaurant it's much easier to ask for them to pay you.
Busking is, I think, one of the absolute best ways for a new performer to get flight time. Figure out the laws in your area (probably aren't any, honestly), and set up shop and start performing. Nothing lets you know if material sucks faster than watching your audience walk away in the middle of it. That being said - busking tends to create a fairly specific type of performer.
Charity work is great, but it also gives you the risk of turning into "The charity magician". I strongly suggest keeping charity performances to a set number per year, or for certain organizations only. Even the largest charities in the country will do their best to avoid paying entertainers. If the only experience one can list on their history is for charities, that will end up locking them into a stereotype of sorts.
Blaine-style street magic is fine for practice but it's, again, something you need to be conscious of. If a performer is just out and about performing with no film crew or anything, that's performing for nothing. People who see you perform for free are not often going to hire you for a decent fee. Particularly if you make a habit of performing in certain areas regularly.
What it really comes down to is having a plan with an ultimate goal in mind, and making sure whatever you do is always getting you closer to that goal, not further away.