Make sure the AI is set to Type; Turret, and the Active checkbox is checked. Once that is done, they should fire at Pirates (since they are considered Neutral, and Pirates are hostile to Neutral)
To claim it for your Faction, Place a Faction Module down anytheres on the Turret, and enter a...