How to make syrups shelf stable?
A syrup can be made shelf stable by reaching the appropriate water activity. Generally, using 2:1 sugar to water is considered sufficient to give you a safe level of water activity of around 0.86, with the only risk being molds, which are luckily visible. So you could start with 200 g of sugar and 100 g of juice and boil that until sufficiently dissolved, but before it gets too thick. A 67% syrup should have a boiling point of 104 C, you can give it a couple more degrees for a better margin of error. 

For true shelf stability without molds, take it to 76% sugar solution. That would be reached at 110 C boiling point. This is the "thread stage", but because of the food safety issues involved, I would use a thermometer and not visual recognition. 

Theoretically, when you add substances other than pure water, such as herbs or fruit pulp from the juice, you could calculate the exact water activity for these somewhat-wet substances. In practice, I would just calculate a lower-limit by treating everything non-sugar as "water". In this sense, you could start with 95g of juice and 5 g of dried spices, instead of 100 g juice, for the same 200 g sugar, and continue from there. 

Do not prepare a simple syrup and then dilute, that's way too watery and has to be kept in the fridge from day one. 



If you want to calcluate your own water activity, the formula for a pure sucrose solution is 


  aw = 1/(1+0.79*n), with n = sugar in kilograms


By solving for aw, you can find out what percentage sucrose solution you need for a given water activity. As mentioned above, the most common food pathogen bacteria stop growth at 0.86, molds at 0.8, and total microbial activity ceases at around 0.6. You can use a table to look up the boiling point of the desired solution, these are available at most candy making resources, even Wikipedia has them.