The favelas (or the PC terminology – comunidades) in Rio de Janeiro and around Brazil have gotten a bad rap over the years (for those of you who don't know, a favela refers to a slum community – in Rio, many of these are built into the hills surrounding the city).
Sure, the drug dealers of Brazil may reside in these communities, and sure, some favelas may lack the infrastructure necessary to function in a manner similar to the rest of the city (adequate roads, running water, electricity, gas, etc.), and sure, you may not be wise to bring small children into them, but despite these minor shortcomings, the favelas of Rio really do have a lot to offer.
or example, Rocinha (the largest favela in Rio and also in Brazil) is a great place to go if you want to eat on the cheap, to pick up some bootleg movies or to buy some inexpensive clothing – they even have a stand with a white horse that you can ride!
There are motorcycle taxis that will whisk you recklessly around the entire favela for only R$2 (they are a thrilling experience), and you can reach some spectacular views at the top of some of those hills.
As awesome as all of this sounds, every local Brazilian (not from the favela) will tell you that you are crazy for going into them (and who knows, maybe they are right) and that neither gringos nor locals have any business going into these communities. I still don't know if this is a result of lingering social stigma and class prejudice, or if there are legitimate dangers to be wary of (after all, it is not uncommon to see young boys casually equipped with automatic weapons in these areas – not the most secure of places I suppose…or is it?).
Ultimately it is an at your own risk sort of thing, but know that if you want to get the most out of the favelas, you will have to go to a baile funk.