China shares ended slightly higher on Thursday, as gains in consumer and new energy companies countered losses in healthcare companies, which were hit by worries of a slump in drug prices.