In a medium saucepan, combine the condensed milk, butter, and shredded coconut.
Cook over medium heat, stirring constantly with a wooden spoon, until the mixture thickens and starts to pull away from the sides of the pan, about 10-15 minutes.
Remove the pan from the heat and let the mixture cool to room temperature.
Using your hands, roll the mixture into small balls, about the size of a cherry.
Place the coconut flakes or shredded coconut in a shallow dish and roll the brigadeiros in the coconut until coated.
Place the brigadeiros in small paper cups or on a plate, and refrigerate for at least 30 minutes before serving.