In a medium saucepan, combine the pineapple juice and cream of coconut. Sprinkle the gelatin over the liquid and let soften for 2 minutes. Heat over low heat, stirring constantly, until the gelatin is dissolved, about 5 minutes; stir in the coconut rum.
Pour the mixture into a 4-by-8-inch loaf pan and refrigerate until set, about 4 hours. Cut into 24 pieces. Garnish each piece with the shredded coconut.