When dealing with insects it is necessary to control harmful pests while attracting and maintaining the helpful insect population. Companion planting fulfills both requirements. For example, the pungent smells of garlic and onion are powerful deterrents to many garden pests, and mint has been shown to keep loopers off cabbage leaves. McClure also says that basil and tomato don't just taste good together but basil wards off an insect that carries a tomato leaf fungus. Adding flowering plants to the garden as decoys to lure bugs away from desirable crops and to get the pests concentrated in one area for easy removal is also an organic companion planting solution to pest problems.
Many flowers are attractive and provide food and shelter for the good insects.
Obviously, intercropping two or more plants will create diversity in the garden, but the interaction of these plants with each other needs to be considered. For example, McClure suggests planting a deep rooting crop like squash with a shallow rooter like onions, or a heavy feeder with a light feeder or a nitrogen supplying legume, or a tall plant with a ground hugger to act as a mulch and keep moisture in the soil. McClure also notes that cucumber monocultures were 10 to 30 times more likely to be infested with striped beetles than cucumber intercrops. Increasing diversity decreases pest problems because the bugs have a harder time finding the plant they want. In conclusion, McClure states that companion planting is a highly effective, practical, and attractive way for plants to share resources and mix different natural defenses for protection against pests and disease.