Beat the butter, sugar, and flour with the paddle attachment on medium speed until smooth, about 2 minutes.
Combine the rum, eggs, and heavy cream. Add to the creamed mixture one-quarter at a time, blending until well combined and scraping the bowl as needed. Add the coconut and blend.
Place oval flexible molds on a sheet pan. Fill a pastry bag fitted