First, a subject is the part of the sentence that the sentence is usually about. In this case, it is who performs an action. The verb usually describes an action. In this sentence, went and bought are the verbs since they describe what someone did/what happened. The thing/person that went somewhere and bought something was Shelley, making Shelley the subject.