There is a process of checking the front page of papers before they get sent off to the exam board (to ensure the correct centre number and candidate number has been used, etc.).
If your teacher happened to be one of the people doing this for your exam then in theory they could take a peek at the content of the paper too. However, I'd say it's extremely unlikely that they'd actually do so.