The most painful thing that can possibly happen to someone. This phrased is used as a comparison, if something is really bad or unpleasurable, you compare it to shitting a pinecone.
Jim: Dude I had to stay with my grandma all last week.
Mike: That sucks.
Jim: Yeah I would have rather been shitting a pinecone.
Popo: Yeah they did surgery without novacaine, it felt like I was shitting a pinecone.