Our legal department is not allowing us to use Shiny applications because we cannot distribute our code outside the company. Is this the correct interpretation of this license? Is there a way to use Shiny in a proprietary environment?
The Shiny R package is covered by GPL, not AGPL. If your legal department is worried about the AGPL used for the open source version of Shiny Server, than you can get a commercial license for Shiny Server Pro (or RStudio Connect).
To complete, here is a link to the licence for shiny
Your code would only use shiny as a package and it is not ship with your app but required for it to run. I don't know exactly how it would apply but my understanding is you don't have to distribute your code outside the company...
If you want to publish your application inside the company but they be accessible publicly (not the code just the app), I would recommande RStudio Connect which is a pro product and a very efficient platform to publish and share R production (Rmarkdown, API, Shiny, Tensorflow, ...)