I have dried basil that I bought at the supermarket spice section.
Last year my neighbor, the one that is a fabulous cook, came over to try and borrow some fresh basil. She was astounded to see that I was not growing any. She asked me how I managed to make pesto when I had no fresh basil. Sorry to admit that I have never made pesto!
So between that and people on the edibles forum encouraging me to grow my own, I will be growing basil on pots this year. All the local nurseries sell plants and many different varieties. Plus seed. So it should not be difficult to get started.
As to rosemary, I have never used it in cooking. I would have no idea what to do with it.