The sentence is grammatically correct, but I can make a few recommendations.
"When she came to my home" for some reason sounds a bit awkward to me. You could say, "when she came over [to my house]," with "to my house" being optional, for example - that sounds more natural/conversational.
I would also dispute the use of "had been" - it is better to just say "was" in order to describe a background action that was taking place before the beginning of another action. "I was at work when you called," "She was living in Paris when the war began," "He was walking home when it started to rain."
So, I would say "I was working in the kitchen when she came over [to my house]" or "I was working in the kitchen when she came to my house," etc.
You also don't need the comma before "when."