To complete a bonus level you must shoot the required amount of balls indicated at the start of that level. It will vary depending on what level your guns is at. For level7 and on the cannon will also shoot out bombs and shooting one of these will immediately cause you to fail that bonus level, but will get you the achievement listed below.
Please note that all achievements unlock once you fully exit the game.