I have a very large basil crop this year for which I am extremely excited. In addition to drying and putting that up for myself over the winter, I want to put up pesto for me. I especially want to ship some to my sister and a friend, both of whom are a bit far flung, in the refrigerated coolers I get some of my medication in. I follow the standard recipe: Genovese basil, nuts, olive oil, Parmesan, garlic and a pinch of salt. In my experience, filling a small jar with pesto and floating some oil atop it keeps it from turning brown for a few days, but pesto rarely lasts around here for more than a two days. Google searches, in every iteration of "preserve pesto basil, pesto long term, shipping, &c." are giving me conflicting answers. A few of the food folks I follow on social media say it can be done with a vacuum packer and then frozen. That makes sense, as there would be no oxygen in the container. Some suggest the ice cube tray method. Still, others say my quest is hopeless. I have no vacuum packer. I am semi-familiar with using citric acid in canning, but wouldn't the addition of acid to the mix instantly brown the basil, rendering that ugly color? I may be putting it in canning jars, but I would never process it like I do vegetables. I have tried the ice cube tray method, but the result is ugly-looking sauce that I feel would be difficult to ship cross-country. Freezing it ruins the texture anyway, in my opinion, likely because the Parmesan is not very freezer-friendly. (Maybe?) When I look at the ingredients on jars of pesto at the market, I see several preservatives, none of which I understand or want in my finished product, even if I did understand them or could get them... I have seen this, but I am not sure it applies. How do you prevent pesto (basil) from becoming bitter? Is there any readily available organic preservative that I could add to the sauce that would preserve the color, flavor and texture? Not only during shipping, but also in what I would like to put up for myself? Update: It appears the consensus is to leave out the cheese, which is certainly doable. I am still holding out hope that some master of canning or food preservation has some advice on a preservative I might add. Especially if that preservative or process would allow it to remain shelf stable at room temperature. 
I typically do one of two things when I'm dealing with my end of year basil crop (trying to use it before that first frost) :  Freeze it: make pesto as normal, except for the cheese.  Portion it out into some sort of small container, and freeze. I have an ice cube tray that I use specifically for this (as it would now make garlic-y ice cubes) and use 3 or 4 for a pound of dry pasta, but I've also used muffin tins.  After freezing, move to a zip-top bag. The surfaces will discolor some, but it doesn't dramatically affect the flavor.  If you're worried about presentation, you can place plastic wrap down in each muffin cup, drop in your pesto, then fold the plastic on top, doing what you can to minimize trapped air.  I've also used large condiment cups if I'm making enough to give away (many Latin grocery stores will have an aisle with stuff for stocking food trucks; they're sold in sleeves of about 25, 50, or 100 depending on the store).  You either fill them full to overflowing, or place a bit of plastic wrap or waxed paper down on the surface so it won't darken. When using the frozen pesto, you can thaw pucks in the microwave, but the ice-cube sized will typically thaw quickly by just putting them in a pot with the hot pasta.  And then add your grated cheese.  I've also made basil infused oil, and kept it in the fridge (for those years when I didn't have enough garlic or nuts on hand, and I heard a forecast of a frost on my drive home after a long day).  But the way that I've done it might be a botulism risk, so you might want to read up on the right way to do it.   I've been freezing pesto for almost two decades now.  Although the basil oil is more versatile, I like the convenience of just throwing a frozen puck in the pasta with some cheese.  (or thawing and slathering it on bread, etc) I've never tried shipping frozen pesto, as I suspect that the shipping cost wouldn't be cost effective.  If I were to do it, I would use 4oz  condiment cups (or the equivalent metric size near 118mL; see above about Latin grocery stores), pressing some plastic wrap into the top before freezing.  Once frozen, I would seal them in a zip top bag, and then ship it overnight in a styrofoam cooler marked 'live seafood'.  (because a co-worker / former FedEx handler said they're extra careful with seafood ... because it stinks if it leaks or gets left behind). 