Just as Peter and John indicated that Jesus left "an example, that you should follow in His steps," Paul's steps followed closely after his Master. In Acts 17:2-3 we see that Paul's custom was to go "into the synagogue ... on three Sabbath days he reasoned with them from the Scriptures." Later in Acts 18 we read that on the Sabbath Paul "reasoned int he synagogue, trying to persuade Jews and Greeks (i.e. Gentiles)." In fact, in Acts 18 there is a record of 76 Sabbaths in which Paul is preaching to Jews and Gentiles.
Paul was in the synagogue. Synagogues are where non Christian Jews assemble on the sabbath day - churches are where Christians assemble, not in a synagogue.
Paul went to the synagogues to preach to non Christian Jews, that Jesus is their Messiah.
It should be blatantly obvious that Paul had to preach to them about Jesus, on the day they were there - on the sabbath.
The fact that there were gentiles in the synagogue is irrelevant - they either had converted to Judaism, or were interested in it - as still happens today.
The following passage shows exactly why Paul went into a synagogue, and gives the sermon he delivered there.
Act 13:14 But when they departed from Perga, they came to Antioch in Pisidia, and went into the synagogue on the sabbath day, and sat down.
Act 13:15 And after the reading of the law and the prophets the rulers of the synagogue sent unto them, saying, Ye men and brethren, if ye have any word of exhortation for the people, say on.
Act 13:16 Then Paul stood up, and beckoning with his hand said, Men of Israel, and ye that fear God, give audience.
Act 13:17 The God of this people of Israel chose our fathers, and exalted the people when they dwelt as strangers in the land of Egypt, and with an high arm brought he them out of it.
Act 13:18 And about the time of forty years suffered he their manners in the wilderness.
Act 13:19 And when he had destroyed seven nations in the land of Chanaan, he divided their land to them by lot.
Act 13:20 And after that he gave unto them judges about the space of four hundred and fifty years, until Samuel the prophet.
Act 13:21 And afterward they desired a king: and God gave unto them Saul the son of Cis, a man of the tribe of Benjamin, by the space of forty years.
Act 13:22 And when he had removed him, he raised up unto them David to be their king; to whom also he gave testimony, and said, I have found David the son of Jesse, a man after mine own heart, which shall fulfil all my will.
Act 13:23 Of this man's seed hath God according to his promise raised unto Israel a Saviour, Jesus:
Act 13:24 When John had first preached before his coming the baptism of repentance to all the people of Israel.
Act 13:25 And as John fulfilled his course, he said, Whom think ye that I am? I am not he. But, behold, there cometh one after me, whose shoes of his feet I am not worthy to loose.
Act 13:26 Men and brethren, children of the stock of Abraham, and whosoever among you feareth God, to you is the word of this salvation sent.
Act 13:27 For they that dwell at Jerusalem, and their rulers, because they knew him not, nor yet the voices of the prophets which are read every sabbath day, they have fulfilled them in condemning him.
Act 13:28 And though they found no cause of death in him, yet desired they Pilate that he should be slain.
Act 13:29 And when they had fulfilled all that was written of him, they took him down from the tree, and laid him in a sepulchre.
Act 13:30 But God raised him from the dead:
Act 13:31 And he was seen many days of them which came up with him from Galilee to Jerusalem, who are his witnesses unto the people.
Act 13:32 And we declare unto you glad tidings, how that the promise which was made unto the fathers,
Act 13:33 God hath fulfilled the same unto us their children, in that he hath raised up Jesus again; as it is also written in the second psalm, Thou art my Son, this day have I begotten thee.
Act 13:34 And as concerning that he raised him up from the dead, now no more to return to corruption, he said on this wise, I will give you the sure mercies of David.
Act 13:35 Wherefore he saith also in another psalm, Thou shalt not suffer thine Holy One to see corruption.
Act 13:36 For David, after he had served his own generation by the will of God, fell on sleep, and was laid unto his fathers, and saw corruption:
Act 13:37 But he, whom God raised again, saw no corruption.
Act 13:38 Be it known unto you therefore, men and brethren, that through this man is preached unto you the forgiveness of sins:
Act 13:39 And by him all that believe are justified from all things, from which ye could not be justified by the law of Moses.
Act 13:40 Beware therefore, lest that come upon you, which is spoken of in the prophets;
Act 13:41 Behold, ye despisers, and wonder, and perish: for I work a work in your days, a work which ye shall in no wise believe, though a man declare it unto you.
Act 13:42 And when the Jews were gone out of the synagogue, the Gentiles besought that these words might be preached to them the next sabbath.
Act 13:43 Now when the congregation was broken up, many of the Jews and religious proselytes followed Paul and Barnabas: who, speaking to them, persuaded them to continue in the grace of God.
Act 13:44 And the next sabbath day came almost the whole city together to hear the word of God.
Act 13:45 But when the Jews saw the multitudes, they were filled with envy, and spake against those things which were spoken by Paul, contradicting and blaspheming.
Act 13:46 Then Paul and Barnabas waxed bold, and said, It was necessary that the word of God should first have been spoken to you: but seeing ye put it from you, and judge yourselves unworthy of everlasting life, lo, we turn to the Gentiles.
The next synagogue visit shows that Paul went there to evangelize the Jews, not to observe the sabbath day:
Act 14:1 Now at Iconium they entered together into the Jewish synagogue and spoke in such a way that a great number of both Jews and Greeks believed.
Act 14:2 But the unbelieving Jews stirred up the Gentiles and poisoned their minds against the brothers.
Act 14:3 So they remained for a long time, speaking boldly for the Lord, who bore witness to the word of his grace, granting signs and wonders to be done by their hands.
Act 14:4 But the people of the city were divided; some sided with the Jews and some with the apostles.