Then the prophet Shemaiah, accompanied by the leaders of Judah who had retreated to Jerusalem before Shishak, came to Rehoboam and said, "GOD's word: You abandoned me; now I abandon you to Shishak."
When GOD saw that they were humbly repentant, the word of GOD came to Shemaiah: "Because they are humble, I'll not destroy them--I'll give them a break; I won't use Shishak to express my wrath against Jerusalem.
Then Shishak king of Egypt attacked Jerusalem. He plundered the treasury of The Temple of GOD and the treasury of the royal palace--he took everything he could lay his hands on. He even took the gold shields that Solomon had made.
Because Rehoboam was repentant, GOD's anger was blunted, so he wasn't totally destroyed. The picture wasn't entirely bleak--there were some good things going on in Judah.
King Rehoboam regrouped and reestablished his rule in Jerusalem. He was forty-one years old when he became king and continued as king for seventeen years in Jerusalem, the city GOD chose out of all the tribes of Israel as the special presence of his Name. His mother was Naamah from Ammon.
The history of Rehoboam, from start to finish, is written in the memoirs of Shemaiah the prophet and Iddo the seer that contain the family trees. There was war between Rehoboam and Jeroboam the whole time.