I've had a generator for over a decade, and have used it to run the house (most of it) when the power goes out. At first, I was using several extension cords to plug in the essential things like the fridge, freezer, sump pump, but that got OLD really quick. I have since installed a 30A outlet on the side of the house and back-feed through this. BEFORE ALL YOU ELECTRICAL PEOPLE GET ALL OVER MY CASE, I'd like to say that I'm fully aware of the safety issue this presents to the utility workers, and make DAMN sure the main breaker is OFF FIRST!
My dad has done the same thing at our cabin. He bought a large gas powered generater and put it in our nice workshop/shed. he then went to the auto parts store and bought a muffler for a small car and adapted it to fit the generator and ran the exhaust out of the shop through a hole. now i don't know much about the exact specs but he installed a large outlet to the side of the breaker panel in the shed. we have a large gauge dual male ended plug that we can run from the generater to the outlet. when the power goes out we shut off the main breaker in the cabin and we can plug in the generater and run power back though the shed into the cabin. works great and I've had to go though this process a few times intoxicated at 2 am when we were having a few parties

haven't blown up anything yet, but my dad did post a big yellow notice in the shed breaker to BE SURE TO SHUT OFF MAIN BREAKER BEFORE PLUGGING IN GENERATOR. i guess a $150 safety device would be worth it, cant imagine the cost and damage if the power came on with the generator running and the main breaker on....
on a side note my dad did come up with an interesting device that i noticed recently. since we installed propane heat, all we really need to power is the TV, fridge, and microwave when the power goes out... somuch for the use of that $800 generator. he took a battery backup from a computer and removed the internal battery, he then ran the battery wires to 3 or 4 small car batteries. this is plugged into the wall and a surge protector is plugged into the output from the backup power supply. we have the items we want to run plugged into the surge protector. worked like a charm the last time the power went out and we ran the TV and a few lights all night and the next day until the power went back on. now I'm no electrician but i thought this seemed a bit dangerous. my dads job involves electronics and wiring so I'm not going to second guess.
edit: now that i think of it, shouldnt the main breaker "pop" and prevent power from being fed back through the circut to the main line? remeber i said I'm no electrician...