Usually people shred the plastic and then run the shredded plastic through a filament extruder. Filament extruders are not that expensive - typically a few hundred. If you can get the pellets, or suitable shredded plastic, then having a separate filament extruder is probably more economical, and convenient, than trying to run them through a printer.

The major cost is the shredder, which usually costs a fair bit.

A really good resource for plastic recycling machines is https://preciousplastic.com. They have a variety of open source machines for shredding, extruding, injection molding, etc.