@thetoolman123
You can place adsense code in the template that loads your pages/posts.
Shortcodes can have the form of
[example]Content passed to shortcode handler[/example]
The shortcode handler can take that content and wrap it in <script> tags before returning the proper JS code. AFAIK the editor will not corrupt code passed in this manner, but you’ll need to confirm this for yourself.
Inserting code onto a page is better handled from an action hook somewhere or as corrinarusso suggests, outputting from a template. The proper way to introduce JS code is through wp_enqueue_script(), but that does at times have its drawbacks.
Thanks for the replies.
How do I go about actually creating a shortcode?
I could paste in may adsense code each time I make a post, but it would be easier to type or paste [adsense-shortcode] for example each time I make a post.
I have a template already, but I want the adsense code after the first paragraph of the post so I would have to do it manually.