To work in Brazil, you will need a work visa and a residence permit. A residence permit can be applied for at your closest Embassy of Brazil. For a work visa, you will have to apply for one with your employer as they are typically only issued to registered Brazilian companies.