Troubled former TV personality Andrew O’Keefe appeared in court on Tuesday just days after being hospitalised following a heroin overdose.