A Swindon court has granted a slavery and trafficking prevention order which will be enforced on a Wiltshire prisoner for 10 years.