Hold the firework at the end of the barrel. Try dropping it into the barrel to make sure it slides completely down the barrel (the fuse or packaging can catch). The manufacturing quality varies widely, so you'll need to test each groundbloom individually.
Light the fuse and drop it into the barrel. Count to x seconds (where x is the fuse lengh), and fire the gun.
You can wait to fire the gun until the groundbloom ignites, but that may overheat the barrel. You don't need paint, but firing balls along with the groundbloom improves height slightly.