Preheat the oven to 350°F (175°C). Line a cupcake tin with cupcake liners.
In a mixing bowl, combine the flour, sugar, cocoa powder, baking powder, and salt. Mix until well blended.
In another bowl, beat the softened butter with an electric mixer until creamy. Add the eggs, rum, crushed pineapple, shredded coconut, and vanilla extract. Mix until fully incorporated.
Gradually add the dry ingredients to the wet mixture, stirring until just combined. Do not overmix.
Divide the batter evenly among the cupcake liners, filling each about two-thirds full.
Bake in the preheated oven for 18-20 minutes, or until a toothpick inserted in the center comes out clean.
Remove from the oven and let the cupcakes cool in the tin for 5 minutes before transferring them to a cooling rack to cool completely.
While the cupcakes are cooling, prepare the frosting. In a mixing bowl, beat the softened butter until creamy. Gradually add the powdered sugar, alternating with the coconut cream, and beat until smooth and fluffy. Stir in the vanilla extract.
Once the cupcakes are completely cool, frost each with the coconut frosting. Garnish with shredded coconut if desired.
Serve and enjoy your Bahama Mama Cupcakes!