British author Alan Shadrake was sentenced to six weeks in prison in Singapore for a book critical of the country's penal system.