You might be able to do it through scripting, but it would take awhile to write something like that.
The best I can think of is you can copy and paste your custom paths (either masks or shape layers) to Illustrator, but you’ll have to do it one layer at a time and then reapply fill, stroke and re-position them to other paths on other layers, etc.
As far as I know you can’t copy built-in rectangle, ellipse or polystar paths from shape layers.