Summarize this article:

The easiest way to keep basil fresh is to keep it alive! Instead of buying a cut bunch of basil at the supermarket, check to see if they also sell small potted basil plants. These usually come in biodegradable “pots” and are typically sold right next to the fresh cut herbs. Alternatively, grow your own basil from seeds either outdoors (when the climate permits) or indoors. Ideally, basil should get 6-8 hours of sunlight per day. If that’s not possible where you live, pick the sunniest windowsill you have. It’s very convenient to have the basil plant on your kitchen windowsill, but it’s more important to find a sunny spot. Stick your index finger 1 in (2.5 cm) down into the potting medium every 1-2 days. If it feels dry at your fingertip, add water until the potting medium looks soaked but not oversaturated. The goal is to keep the potting medium evenly moist. You’ll likely figure out the proper watering frequency within a week. This is the best part about having fresh, live basil right at your fingertips. Identify the most colorful, crisp-tender leaves and pluck just the number you need at that moment.  For instance, grab a few of the prettiest leaves to make your guests a range of delicious basil cocktails!  Remove and discard leaves that have wilted or developed brown or black spots. Kept in its original compostable pot, the supermarket basil plant will likely give you 1-2 months of high-quality basil leaves. Once it stops producing abundantly, go ahead and get a replacement from the grocery store. The basil will likely last longer if you transfer it to a larger pot, but it may also grow larger than you’d prefer, especially if you have space limitations.

Summary:
Buy a small potted basil from your grocer’s produce department. Set the pot on a windowsill that gets ample sunlight. Keep the potting medium evenly moist with regular watering. Pluck off fresh leaves right when you need them. Replace it with a new potted basil every several weeks, as needed.