No, not all bacteria have the same shape, but vary greatly. The spherical bacteria, called cocci (such as Staphylococcus aureus) occur singularly in some species and as groups in other species. They have the ability to stick together and form a pair (diplococci). When they stick together in long chains, they are called streptococci; in irregularly shaped clumps or clusters of bacteria they are called staphylococci. Rod-shaped bacteria, called bacilli, occur as single rods or as long chains of rods (such as Salmonella typhi). Spiral-or helical-shaped bacteria are called spirilla (such as Campylobacter jejuni).
Bacteria come in a variety of shapes, the most common being varieties of cocci and bacilli.