Using the example "to obtain similar to or similarly to," the latter sounds very strange even though similarly is definitely being used as an adverb. The sentence: "The fragments were obtained similar to / similarly to the sticks." This would be much less wordy than "The fragments were obtained using a procedure similar to that used to obtain the sticks," (or: with the same procedure as that used to obtain - still wordy), but which is correct, "x" was obtained similar to or similarly to "y"?
To this point, the original poster and a commenter have suggested three options for expressing the intended idea:
The fragments were obtained similar to the sticks.
The fragments were obtained similarly to the sticks.
The fragments were obtained in a way similar to the sticks.
To my mind, none of these options is entirely satisfactory. As the poster notes, the similarity under consideration isn't between the fragments and the sticks, but between the procedure for obtaining the fragments and the procedure for obtaining the sticks. This is particularly problematic for option 1, which doesn't explicitly mention procedures (or methods or processes or ways) at all and which introduces the comparison by means of "similar to" (rather than "similarly to")—a phrase that normally introduces comparisons of nouns rather than of verbs. Presented with the sentence in option 1, I would wonder whether the intended meaning involved a similarity between processes of acquisition (the procedure for obtaining the fragments and the procedure for obtaining the sticks) or a similarity between the things ultimately obtained (the fragments and the sticks). Either way, the wording does not clearly express the underlying idea.
Although option 3 has the advantage of explicitly indicating (via the phrase "in a way") that a procedure is of interest, it still has the problem that it literally compares the way that the fragments were obtained with the sticks themselves (not with the way the sticks were obtained). Therefore, the comparison, as expressed, is not in parallel. To make it whole, the reader must supply the missing part of the comparison (the procedure by which the sticks were obtained). The problem is somewhat similar to comparing "apples to picking oranges," except that here the form is closer to comparing "picking apples to oranges." With a bit of effort, the reader can fill out the parallel structure that option 3 implies:
The fragments were obtained in a way similar to the way in which the sticks were obtained.
But it seems to me that the writer in this case is expecting the reader to do an awful lot of grunt work to reach the intended meaning.
I skipped over option 2 earlier because it has a different problem from options 1 and 3. Syntactically, the construction "The fragments were obtained similarly to the sticks" is correct; but it sounds unnatural, perhaps because people are much more accustomed to making and hearing noun-to-noun comparisons than verb-to-implied-verb comparisons. As a result, filling in the blanks in this shortened form is trickier than you might suppose from looking at it. The simplest long form that I could construct from the skeleton of option 3 is
The fragments were obtained similarly to how the sticks were obtained.
The simplest way to express the idea underlying the sentence might be this:
The fragments and the sticks were obtained similarly.
But that wording may not be an option if you've already described the method by which the sticks were obtained and now you want to turn your attention to the question of how the fragments were obtained. In that case, I would be inclined to return to a truly parallel noun-to-noun comparison and accept that the result will be a bit long-winded:
The process for obtaining the fragments resembled [or 'was much like'] the process for obtaining the sticks.
I would just follow the examples from https://en.oxforddictionaries.com/definition/similar:
‘Spawning takes place between October and December, and is very similar to that of the brown trout.’
‘This is because when it's canned, these fats are reduced to levels similar to white fish.’
‘They were thrilled to find rough red tiles similar to those used by the Romans.’
‘The aim was to sample the planet surface for signs of lifeforms similar to those that could survive on earth.’
‘The breadth of this vision is clearest in a sequence very similar to the suicide scene.’
‘The situation in Denmark is very similar to that in Spain, but again, only time will reveal all.’
‘I think we can expect to hear words very similar to those when the defence sums up its case.’
‘Even sinkholes similar to the one last summer have been around since the 18th Century.’
‘After all a bully is somewhat similar to a stalker, they follow you, taunt you, frighten you.’
‘This wide sweeping course is one of the newest on the circuit, and is very similar to Las Vegas and Michigan.’
‘His language was very similar to the language of Slavs living around the town.’
‘Obviously, this was a sterner test but the essence of golf required was very similar to those courses.’
‘You will note that this list is very similar to the likely 18 centres that Turkey would need to win.’
‘In a recent study of this mutant, results very similar to those of Smith et al. were obtained.’
usually as submodifier
In a similar way.
‘a similarly priced property’
‘This means that every new trough will be at a higher price and every new peak will be similarly higher.’
‘The power, glamour and authority of business, roaming the Net, will similarly increase.’
‘Another has a similarly painted blue surface on which the artists have placed polystyrene to resemble ice.’
‘The intimacy of the mobile phone creates a similarly fragmented network of communication and desire.’
‘The eviction similarly feels too didactic to be dramatic and too staged to be convincingly informative.’
‘Maybe others can enlighten me, and anyone else who is similarly curious.’
‘This case is indistinguishable from Pirelli and must be decided similarly.’ ‘They were similarly drunk, though not on the point of collapse just yet.’
‘When I saw that Bosch appliances were now similarly priced to Zanussi, I got suspicious.’
‘The shower room, made by his carpenter friend Tom Brown, was similarly inspired by a Japanese look.’
‘In December, an Arab-American Secret Service agent was similarly banned from a flight.’
‘The last time was a couple of months ago, and it was similarly deadly.’
‘It also has a class and breeding that sets it apart from its similarly priced German rivals.’
‘This corresponds to a similarly animated and rebellious stratum of western society.’
‘A number of museums and galleries have suffered similarly in recent years.’
‘Generating a figure for mobile phone use would be similarly difficult.’
‘He adopts a similarly impressive cloak to go with his new identity as super hero.’
‘The whole concept of the scout, insidiously checking that we behave, is similarly ridiculous.’
‘It would be no surprise to see others follow with similarly drastic measures if we are to avoid some heavy casualties.’
‘Solar power has the potential to provide a similarly limitless capacity.’