Preheat the oven to 350 degrees and line three 6 inch cakes (or two 8 inch cakes) with cooking spray and parchment paper.
Whisk together the flour, baking powder, salt, and shredded coconut.
In another bowl, cream butter and sugar together on medium speed with an electric mixer until fluffy. Add the coconut extract and the eggs. Mix until completely incorporated.
Add half of the flour mixture and half of the coconut milk, and mix well. Repeat with the second half of the flour mixture and the coconut milk.
Divide cake batter among the prepared pans and bake for 20 minutes, or until the center is set and a toothpick inserted into the center of the cakes comes out clean. Let cakes cool in the pans for 10 minutes, then transfer them to a wire rack to cool completely.
When cakes are cool, brush the top of each cake layer with coconut rum.