A new voluntary code of conduct has been introduced in sourthern India requiring clothing factories to stop putting teenage girls on night shifts in a bid to stop sexual harassment.