Your exam paper will contain an extract that will hold some significance to the play as a whole. Examiners will always award the highest marks to those students who refer to the plot and character beyond just the extract. Think of the extract as a springboard to the rest of the play and take a whole-text approach to write your essay.
In practice, this means it is very successful to reference other parts of the play that relate to the extract, and even better if they contrast with the ideas or characterisation that Shakespeare is presenting in the chosen extract. So think: does Shakespeare present this character differently in other parts of the play? Do we see any character development? What ideas is he exploring when showing this contrast? You don’t always need to use quotations to show these changes, with the exam board suggesting that “looking at contrasts and parallels in characters and situations at different points in the text” is just as successful.