Pineapples are definitely fruits. They are very sweet and often eaten as a type of dessert. They are most commonly eaten raw, like most other fruits, but they are sometimes grilled first. However, this only seems to make them even sweeter and more delicious somehow.
Sometimes they are put on otherwise savory foods like hamburgers or pizza, but this is in contrast to the savory flavors. It isn’t used as a savory flavor itself like tomatoes or olives might be.
Botanically, they are impliedly also fruits. They are interestinglly what are called mulitple fruits because each pineapple is formed by the fusion of many small pineapple flowers. Each flower produces its own botanical berry which then all merge to form a single pineapple fruit.