Yes, a chili is botanically classified as a fruit.
Chili peppers, often simply called "chili" or "chile," are indeed the fruit of plants belonging to the Capsicum genus. This classification stems from the botanical definition of a fruit: a mature ovary containing seeds. Chili peppers develop from the flower's ovary and contain seeds, fulfilling this definition.
Despite being botanically a fruit, chilis are frequently used culinarily as vegetables or spices due to their savory and spicy flavors. This distinction highlights the difference between botanical and culinary classifications.
Therefore, while you might find them alongside vegetables in a grocery store or use them to add heat to savory dishes, remember that, from a scientific perspective, chilis are fruits.