Can I visit a favela?
The German Foreign Office advises against visiting any of Rio's favelas, explicitly including guided tours and "party tours". We therefore don't recommend favela tours. The only favela we mention is Vidigal, because the hike up the Morro Dois Irmãos viewpoint starts there – see the Dois Irmãos entry.
Source: auswaertiges-amt.de