It's normal to be nervous. Even if you're totally stuttering and falling apart, what will matter is that she will find out your name, you will find out hers, and for most people it's doesn't matter that much if you're nervous.
As for how to do it, I would suggest trying to be "accidently" next to her and making an observation about a situation (try to not make it about her.. especially her physically.. because that is maximum potential for creepy territory. Unless it was a really good observation, like if she's wearing a t-shirt of your favourite band or something. But even that one is a tiny bit creepy because you're like, looking at her chest.) Make a comment on something relevant to what you're doing or looking at like, if you were both at the counter you could say "The steak here's pretty good" Or.. uh.. something less lame but make sure it's honest. You don't want to lie because that's just weird. Don't make her eat a terrible steak). And then, IF SHE RESPONDS IN A FRIENDLY WAY (big conditional because if she's like, silent, or unfriendly, it makes it super awkward) then as you're about to walk away, just go "I'm ____, by the way" and smile and maybe offer a handshake, and then say "I'll see you around" or "See ya" and then leave ASAP. Hanging around if there's no further dialogue is super creepy.
And don't worry if she doesn't take your hand, or doesn't want to introduce herself. If she's not 100% creeped out, she may tell you next time. Many girls are just wary of strangers at first so don't expect her to be like giving you her address and personal details anytime soon.