In determining how to implement this chapter, the Department of Corrections shall be guided by the need to utilize the most cost-efficient methods possible. Therefore, the Director of Corrections may enter into contracts, with the approval of the Director of General Services, with appropriate public or private agencies, to provide housing, sustenance, services as provided in subdivisions (a) and (b) of Section 3412, and supervision for such inmates as are eligible for placement in community treatment programs. Prisoners in the care of such agencies shall be subject to all provisions of law applicable to them.