He has sold a total of 5 + 7 = <<5+7=12>>12 chocolate bars so far.
James needs to sell 18 - 12 = <<18-12=6>>6 more chocolate bars.
#### 6