Pila can be, and were, used as spears




The order to repel cavalry by Roman army officers brought about a defensive formation, in which the front rank formed a tight wall of shields with their pila protruding to form a line of spearheads ahead of the wall. Undoubtedly it would be very hard to bring a horse to break into that formation. The most likely occurrence would be that it would come to a halt of its own will ahead of the spearheads. It was at that moment that horse and rider would be at their most vulnerable against the ranks behind the first line of infantry which would then hurl their spears at them. Given the short distance and the training legionaries received, it is likely such halted cavalry, frantically trying to turn their horses around to retreat, whilst colliding with horses following in the charge, would prove very easy targets.
If one further considers the likely possibility of archers being present, as is the case on the photo above, the effect of this formation could indeed be devastating.
http://www.roman-empire.net/army/tactics.html