This picture is called 'Florizel and Perdit' and it is by Charles Robert Leslie.
Florizel is a character in Shakespeare's The Winter's Tale.
Florizel is the son of a King. He falls for Perdita, and wants to marry her. His father objects and warns him that his inheritance will be removed if he sees her again. The objection to the marriage is because he knows Perdita is a shepherdess.
'Shepherdess With Her Flock' by Jean Francois Millet
Florizel still loves her. He disguises himself as a shopkeeper to see her. The dilemma is resolved when it is discovered she is royal anyway.
Princesses don't normally look after sheep, but she did. It was because she didn't know her about parents or her history. She considered herself to be a simple girl.
'Perdita' by Anthony Frederick Augustus Sandys