Preheat oven to 350°F (175°C). Line a cupcake tin with paper liners.
In a mixing bowl, cream together the butter and sugar until light and fluffy.
Add the eggs one at a time, beating well after each addition. Stir in the vanilla extract.
In another bowl, whisk together the flour, baking powder, and baking soda. Gradually add to the butter mixture, alternating with the coconut milk and coconut rum. Mix until just combined.
Fold in the shredded coconut.
Divide the batter evenly among the prepared cupcake liners.
Bake for 20-25 minutes, or until a toothpick inserted into the center comes out clean. Allow to cool in the tin for 10 minutes, then transfer to a wire rack to cool completely.